develooper Front page | perl.libwww | Postings from September 2008

Re: [PATCH] FIFO header order support in HTTP::Headers

Thread Previous | Thread Next
From:
Michael Greb
Date:
September 5, 2008 16:44
Subject:
Re: [PATCH] FIFO header order support in HTTP::Headers
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sep 5, 2008, at 7:23 PM, Gisle Aas wrote:
> On Fri, Sep 5, 2008 at 7:49 PM, Michael Greb <mgreb@linode.com> wrote:
> As I said above I would solve the problem by not changing
> 'header_field_names' at all.  Do you feel the scan interface isn't
> good enough for your use case?

This makes a lot of sense and scan will suit us just fine.

>> Writing code is easy, it's deciding how that code should behave  
>> that is the
>> hard part.
>
> True; and in this case we need to define what happens when fields are
> modified with 'push', 'set' or 'init' and 'remove' as that's the API
> that modify stuff.  Let me suggest the following definition of the
> behaviour:
>
> - 'push' always append the field at the end of all headers.  multiple
> occurrences of a field name do not have to be consecutive.
>
> - 'init' either does nothing or it works like 'push'.
>
> - 'remove' will always remove all concurrences of a field.
>
> - 'set' will work like 'push' if no other occurrence of the field  
> exists.
>
> - 'set' will update the first occurrence if the field exists (and
> remove all other occurrences).  if multiple field values is provided
> with 'set' they are basically all injected at the location of the
> first existing value.
>
> You want to try to implement this?

Yes.  Have a good chance of losing net connectivity at home this  
weekend so this makes for a perfect no Internets required weekend  
project ;)

Should wire order imply wire case as well?

- --
Michael Greb
Linode.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iD8DBQFIwcQ90Qbp4bPZvesRAhgBAJ4tt5Gf4T6Pv+cjOA29nFRdkALrsQCg1er8
njeuK0Lt4ZFAJZaIt13q8dY=
=0L3l
-----END PGP SIGNATURE-----

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About