Re: [Pharo-project] HTTP client library in Pharo?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] HTTP client library in Pharo?

Andreas.Raab
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 <[hidden email]
> <mailto:[hidden email]>> 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

Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] HTTP client library in Pharo?

Andrey Larionov
Hi, Andreas. Could you also look in cross-domain cookie handling. When
domain specified with leading period. For example: .squeak.org
It mean, what cookie will be available for squeak.org domain and for
all subdomains of squeak.org.

On Wed, Aug 4, 2010 at 21:15, Andreas Raab <[hidden email]> wrote:
> ah, that's a silly bug. Thanks for reporting.

Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] HTTP client library in Pharo?

Andreas.Raab
Hi Andrey -

Regarding your issues with WebClient's cookie handling I have two
questions where you (or someone else knowledgeable) might be able to
help me:

1) Do you have an application that can't deal with the separate Cookie
header lines? I could change that fairly easily if needed but since (I
think) the RFC allows it, I'm wondering if there's any need for it.

2) What are the rules for cross-domain cookies? Are the user agents
expected to accept random cross-domain cookies? I've not found any
definite reference regarding this, any information would be helpful.

Cheers,
   - Andreas


On 8/4/2010 10:20 AM, Andrey Larionov wrote:
> Hi, Andreas. Could you also look in cross-domain cookie handling. When
> domain specified with leading period. For example: .squeak.org
> It mean, what cookie will be available for squeak.org domain and for
> all subdomains of squeak.org.
>
> On Wed, Aug 4, 2010 at 21:15, Andreas Raab<[hidden email]>  wrote:
>> ah, that's a silly bug. Thanks for reporting.
>
>


Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] HTTP client library in Pharo?

Andrey Larionov
> 1) Do you have an application that can't deal with the separate Cookie
> header lines? I could change that fairly easily if needed but since (I
> think) the RFC allows it, I'm wondering if there's any need for it.

This is not an issue for me (probably you can mix up me and Andrey Stebakov (= )

> 2) What are the rules for cross-domain cookies? Are the user agents
> expected to accept random cross-domain cookies? I've not found any
> definite reference regarding this, any information would be helpful.

It's my mistakes they called cross-subdomain cookies.
You can look at cookies for google.com for example. But RFC for this cases are
http://www.ietf.org/rfc/rfc2109.txt?number=2109 section 4.3
and also this tutorial http://www.15seconds.com/issue/971108.htm

--
Andrey Larionov

Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] HTTP client library in Pharo?

Andreas.Raab
On 8/5/2010 4:53 AM, Andrey Larionov wrote:
>> 1) Do you have an application that can't deal with the separate Cookie
>> header lines? I could change that fairly easily if needed but since (I
>> think) the RFC allows it, I'm wondering if there's any need for it.
>
> This is not an issue for me (probably you can mix up me and Andrey Stebakov (= )

Yes indeed. Sorry for that :-)

>> 2) What are the rules for cross-domain cookies? Are the user agents
>> expected to accept random cross-domain cookies? I've not found any
>> definite reference regarding this, any information would be helpful.
>
> It's my mistakes they called cross-subdomain cookies.
> You can look at cookies for google.com for example. But RFC for this cases are
> http://www.ietf.org/rfc/rfc2109.txt?number=2109 section 4.3
> and also this tutorial http://www.15seconds.com/issue/971108.htm

Thanks, these are very helpful references. The latest versions should
get cookie handling right.

Cheers,
   - Andreas

Reply | Threaded
Open this post in threaded view
|

Re: HTTP client library in Pharo?

Andreas.Raab
In reply to this post by Andreas.Raab
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<[hidden email]>  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<[hidden email]
>>> <mailto:[hidden email]>>  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/[hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>


Reply | Threaded
Open this post in threaded view
|

Re: HTTP client library in Pharo?

Andrei Stebakov
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...

On Thu, Aug 5, 2010 at 11:09 PM, Andreas Raab <[hidden email]> 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<[hidden email]>  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<[hidden email]
>>>> <mailto:[hidden email]>>  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/[hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: HTTP client library in Pharo?

Andreas.Raab
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<[hidden email]>  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<[hidden email]>    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<[hidden email]
>>>>> <mailto:[hidden email]>>    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/[hidden email]
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>
>>
>>
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] HTTP client library in Pharo?

Andrey Larionov
In reply to this post by Andreas.Raab
Thanks, Andreas.

On Fri, Aug 6, 2010 at 07:08, Andreas Raab <[hidden email]> wrote:
> Thanks, these are very helpful references. The latest versions should get
> cookie handling right.

Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] HTTP client library in Pharo?

stephane ducasse-2
+1
WebClient is important!


> Thanks, Andreas.
>
> On Fri, Aug 6, 2010 at 07:08, Andreas Raab <[hidden email]> wrote:
>> Thanks, these are very helpful references. The latest versions should get
>> cookie handling right.
>


Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] HTTP client library in Pharo?

Andrei Stebakov
I also wholeheartedly agree it's very important!!!
Thank you Andreas for the wonderful job you've done.


On Fri, Aug 6, 2010 at 5:38 PM, stephane ducasse
<[hidden email]> wrote:

> +1
> WebClient is important!
>
>
>> Thanks, Andreas.
>>
>> On Fri, Aug 6, 2010 at 07:08, Andreas Raab <[hidden email]> wrote:
>>> Thanks, these are very helpful references. The latest versions should get
>>> cookie handling right.
>>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] HTTP client library in Pharo?

Andrei Stebakov
In reply to this post by Andreas.Raab
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 <[hidden email]> 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 <[hidden email]
>>> <mailto:[hidden email]>> 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
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>

Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-project] HTTP client library in Pharo?

Andrei Stebakov
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.

On Sat, Aug 7, 2010 at 1:20 PM, Andrei Stebakov <[hidden email]> 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 <[hidden email]> 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 <[hidden email]
>>>> <mailto:[hidden email]>> 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
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: HTTP client library in Pharo?

Andreas.Raab
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<[hidden email]>  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<[hidden email]>  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<[hidden email]
>>>>> <mailto:[hidden email]>>  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/[hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>
>>


Reply | Threaded
Open this post in threaded view
|

Re: HTTP client library in Pharo?

Andrei Stebakov
Hi Andreas

In what form the patches should be sent (I guess there is some general
way of doing it in Pharo/Squeak)?

On Tue, Aug 10, 2010 at 1:23 AM, Andreas Raab <[hidden email]> 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<[hidden email]>  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<[hidden email]>  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<[hidden email]
>>>>>> <mailto:[hidden email]>>  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/[hidden email]
>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>
>>>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: HTTP client library in Pharo?

Andreas.Raab
On 8/10/2010 7:29 AM, Andrei Stebakov wrote:
> In what form the patches should be sent (I guess there is some general
> way of doing it in Pharo/Squeak)?

Change sets, Monticello packages are all fine.

Cheers,
   - Andreas

> On Tue, Aug 10, 2010 at 1:23 AM, Andreas Raab<[hidden email]>  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<[hidden email]>    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<[hidden email]>    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<[hidden email]
>>>>>>> <mailto:[hidden email]>>    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/[hidden email]
>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>
>>>>
>>
>>
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: HTTP client library in Pharo?

Tobias Pape

Am 2010-08-10 um 17:33 schrieb Andreas Raab:

> On 8/10/2010 7:29 AM, Andrei Stebakov wrote:
>> In what form the patches should be sent (I guess there is some general
>> way of doing it in Pharo/Squeak)?

If you refer to general contributions to Squeak, refer to
http://squeakboard.wordpress.com/2009/07/02/a-new-community-development-model/
where the trunk/inbox concept is described.
  For Pharo, I don't know.
Note that WebClient isn't an integral part of Squeak Trunk at this moment.

So Long,
        -Tobias


Reply | Threaded
Open this post in threaded view
|

Re: HTTP client library in Pharo?

Göran Krampe
In reply to this post by Andreas.Raab
On 08/10/2010 07:23 AM, Andreas Raab 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.

Isn't it easier to let the SS project be writable for anyone and then
you integrate and make official "releases"?

At least my impression is that such an "open" style works quite nicely.

regards, Göran

Reply | Threaded
Open this post in threaded view
|

Re: HTTP client library in Pharo?

Andrei Stebakov
In reply to this post by Andreas.Raab
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?

On Tue, Aug 10, 2010 at 1:47 PM, Andrei Stebakov <[hidden email]> 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 <[hidden email]> 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<[hidden email]>  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<[hidden email]>  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<[hidden email]
>>>>>>> <mailto:[hidden email]>>  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/[hidden email]
>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>
>>>>
>>
>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: HTTP client library in Pharo?

Andreas.Raab
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<[hidden email]>  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<[hidden email]>  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<[hidden email]>    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<[hidden email]>    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<[hidden email]
>>>>>>>> <mailto:[hidden email]>>    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/[hidden email]
>>>>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>>>>>
>>>>>
>>>
>>>
>>>
>>
>
>


12