|
|
cURL Mailing List Monthly Index Single Mail
curl-tracker Archives
[ curl-Bugs-3404348 ] COOKIELIST interface producing RFC violation.
From: SourceForge.net <noreply_at_sourceforge.net>
Date: Tue, 06 Sep 2011 22:11:43 +0200
Bugs item #3404348, was opened at 2011-09-05 18:48
Please note that this message will contain a full copy of the comment thread,
Initial Comment:
Curl's detection of a duplicate cookie is based on the combined value of the path/domain/flags set in the cookie. However this approach is flawed, because it is possible to set two cookie values of the same name that are then transmitted in a single HTTP request. An RFC complaint server will interprete the first cookie set, ignoring the duplicate cookie value. (As a result the server will invariably ignore the value that is being set with the setopt COOKIELIST interface.)
when libcurl is determining the "Cookie:" HTTP header for a request and additional check should be made to look for two cookie values of the same name and only choose to set one. From the programmers perspective the setopt() should always supersede any other state, thus giving the user of the library full control. This should happen so long as the setopt()'ed cookie has a valid domain and path for this request, even if this domain/path differs from the one set via a "Set-Cookie:" HTTP header.
The following temporary fix mitigates the issue, however it is a dirty dirty hack:
def removeDupeCookies(self):
----------------------------------------------------------------------
Comment By: Daniel Stenberg (bagder)
Message:
Second, sure browsers can send duplicate variable names. If there are
This taken together, your bug report doesn't make a lot of sense to me.
----------------------------------------------------------------------
You can respond by visiting:
These mail archives are generated by hypermail. |
Page updated November 12, 2010.
web site info