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

Andrei Stebakov lispercat at gmail.com
Wed Aug 11 16:58:55 UTC 2010


Hi Andreas
I've send the package directly to you.
As for ";" vs "," there is nothing arbitrary about it. Even though the
rule says:
cookie          =       "Cookie:" cookie-version
                          1*((";" | ",") cookie-value)

meaning that the delimiter could be either one, the server I am
working with only accepts a ";" as a delimiter.
Also to back me up on this the FireFox also uses ";" as a cookie delimiter.


On Wed, Aug 11, 2010 at 11:59 AM, Andreas Raab <andreas.raab at gmx.de> wrote:
> On 8/11/2010 7:47 AM, Andrei Stebakov wrote:
>>
>> I tried to attach the package (mcz file) to the thread but it got
>> rejected by moderator saying that the message was bigger than 100K.
>>
>> I changed the cookie delimiter from ',' to ';'. Also I "relaxed" the
>> rule that a domain in the cookie should have a '.' at the beginning
>> (in many cases it doesn't have it so some libraries "normalize" it by
>> putting the period in front of the domain).
>> Also I created the SocketStreamDebug which allowed me to see all the
>> requests and responses in the Transcript window, maybe there is a
>> better way, I am very new to Smalltalk.
>> What's the other way for me to send the changes?
>
> You could send them directly to me but since the changes are kind of simple,
> I'm more interested in the "why" of these changes. In particular the change
> to the cookie delimiter seems rather arbitrary to me. Can you elaborate why
> that change should be made?
>
> Cheers,
>  - Andreas
>
>> On Tue, Aug 10, 2010 at 1:47 PM, Andrei Stebakov<lispercat at gmail.com>
>>  wrote:
>>>
>>> The package is attached.
>>> I changed the cookie delimiter from ',' to ';'. Also I "relaxed" the
>>> rule that a domain in the cookie should have a '.' at the beginning
>>> (in many cases it doesn't have it so some libraries "normalize" it by
>>> putting the period in front of the domain).
>>> Also I created the SocketStreamDebug which allowed me to see all the
>>> requests and responses in the Transcript window, maybe there is a
>>> better way, I am very new to Smalltalk.
>>>
>>>
>>> On Tue, Aug 10, 2010 at 1:23 AM, Andreas Raab<andreas.raab at gmx.de>
>>>  wrote:
>>>>
>>>> On 8/9/2010 9:18 PM, Andrei Stebakov wrote:
>>>>>
>>>>> What's the process of code review for Sqeak/Pharo?
>>>>> I just tried to post my changes for WebClient Monticello repository
>>>>> via "Save" and it got rejected with error "401". Looks like I don't
>>>>> have write access to it.
>>>>
>>>> That's right. I'm the sole author of WebClient for the time being. If
>>>> you
>>>> have patches or improvements that you'd like to contribute, please send
>>>> them
>>>> to me.
>>>>
>>>> Cheers,
>>>>  - Andreas
>>>>
>>>>> On Sat, Aug 7, 2010 at 1:20 PM, Andrei
>>>>> Stebakov<lispercat-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org>    wrote:
>>>>>>
>>>>>> Yes, that's correct for Set-cookie (the response), each has its own
>>>>>> line.
>>>>>> "Cookies: " for request should be all in one line.
>>>>>>
>>>>>> On Sat, Aug 7, 2010 at 8:05 AM, Philippe
>>>>>> Marschall<kustos-hi6Y0CQ0nG0 at public.gmane.org>    wrote:
>>>>>>>
>>>>>>> On 04.08.2010 19:15, Andreas Raab 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."
>>>>>>>
>>>>>>> You're correct, but that doesn't mean the implementations follow the
>>>>>>> spec :-(. I can only speak for Set-Cookie, there you have to send
>>>>>>> each
>>>>>>> cookie on a new line because the expires date format includes a comma
>>>>>>> and Firefox and IE can't handle that.
>>>>>>>
>>>>>>> Cheers
>>>>>>> Philippe
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> 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