[squeak-dev] Re: HTTP client library in Pharo?

Andreas Raab andreas.raab at gmx.de
Fri Aug 6 07:22:33 UTC 2010


On 8/5/2010 8:54 PM, Andrei Stebakov wrote:
> Also I forgot to mention that HEAD requests should also support redirects.
> When you issue a HEAD request for some url it should go trough all
> redirects collecting all the cookies so that you'll end up with the
> headers/cookies for the final destination for the url.
> Well, it's just an easy one-line code change anyway...

I fixed this too.

Cheers,
   - Andreas

> On Thu, Aug 5, 2010 at 11:09 PM, Andreas Raab<andreas.raab at gmx.de>  wrote:
>> On 8/5/2010 11:13 AM, Andrei Stebakov wrote:
>>>
>>> Maybe some servers may accept this, but the one I am working with
>>> chokes on it and skips all the "Cooke: " statements following the
>>> first one.
>>> If you take a look at the "Live HTTP headers" with FireFox, you'll see
>>> requests with cookies follow the "all-cookies-in-one-line" rule.
>>
>> I'm pretty sure it's allowed per RFC to send multiple Cookie headers, but
>> I've changed it anyway.
>>
>> Cheers,
>>   - Andreas
>>
>>> On Wed, Aug 4, 2010 at 1:15 PM, Andreas
>>> Raab<andreas.raab-Mmb7MZpHnFY at public.gmane.org>    wrote:
>>>>
>>>> On 8/4/2010 9:57 AM, Mariano Martinez Peck wrote:
>>>>>
>>>>> Hi Adrei, excellent :)
>>>>>
>>>>> BTW, for HTTP Client you should cc Andreas Raab   or squeak mailing
>>>>> list....
>>>>
>>>> Squeak-dev please
>>>> (http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/squeak-dev).
>>>>
>>>>> On Wed, Aug 4, 2010 at 6:08 PM, Andrei
>>>>> Stebakov<lispercat-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
>>>>> <mailto:lispercat-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org>>    wrote:
>>>>>
>>>>>     I also found that cookies were not correctly sent.
>>>>>     Every cookie was sent with its own "Cookie: " header which is not
>>>>>     correct.
>>>>
>>>> I'm curious, why do you think that's incorrect? My understanding is that
>>>> RFC
>>>> 2616 explicitly allows that:
>>>>
>>>>         "Multiple message-header fields with the same field-name MAY be
>>>> present in a message if and only if the entire field-value for that
>>>> header
>>>> field is defined as a comma-separated list [i.e., #(values)]. It MUST be
>>>> possible to combine the multiple header fields into one 'field-name:
>>>> field-value' pair, without changing the semantics of the message, by
>>>> appending each subsequent field-value to the first, each separated by a
>>>> comma."
>>>>
>>>> And the condition appears to be satisfied in RFC 2109 regarding the
>>>> Cookie
>>>> header:
>>>>
>>>> "The syntax for the header is:
>>>>
>>>>    cookie          =       "Cookie:" cookie-version
>>>>                            1*((";" | ",") cookie-value)
>>>> ... "
>>>>
>>>>
>>>>>     Also cookie collection is too restrictive to the domain. Let's say
>>>>>     your request goes to www.domain.com<http://www.domain.com>    and in
>>>>>     the cookies it'll have
>>>>>     domain.com<http://domain.com>.
>>>>>     Those cookies won't be collected since the current algorithm requires
>>>>>     it to match from the start of the string (probably should only match
>>>>>     the end of the string).
>>>>
>>>> Yeah, that's a silly bug. Thanks for reporting.
>>>>
>>>> Cheers,
>>>>   - Andreas
>>>>
>>>> _______________________________________________
>>>> Pharo-project mailing list
>>>> Pharo-project-bM+ny+RY8h+a+bCvCPl5/gCzwTLBPCX0 at public.gmane.org
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>
>>
>>
>>
>
>




More information about the Squeak-dev mailing list