[issue1564508] RFC 2965 BaseCookie does not support "$Port"

2019-04-24 Thread Martin Panter

Martin Panter  added the comment:

The original report comes from . 
Anders was trying to parse a HTTP request Cookie field, something like:

BaseCookie('sessionid=a2be2e7debe71af8d88d350c4d14d768;$Path=/;$Domain=192.168.0.2;$Port="8000"')

The problem is that Cookie.py assumes names beginning with a dollar sign ($) 
are reserved attributes of a previous cookie-pair, rather than arbitrary cookie 
names. It is obvious that this was intended to support RFC 2965, although it is 
not documented. The module has a hard-coded list of reserved attribute names, 
and Port is not one of them.

IMO it would be better to treat (unknown) reserved attributes such as $Port as 
ordinary cookie names, and start a new “morsel”. Ignoring them would also be a 
better option than rejecting the whole cookie field. The dollar sign is valid 
for a cookie name (token) according to RFC 2109, RFC 6265, and the Netscape 
specification.

--
nosy: +martin.panter

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1564508] RFC 2965 BaseCookie does not support $Port

2014-02-03 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
nosy:  -BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1564508
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1564508] RFC 2965 BaseCookie does not support $Port

2010-08-24 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

This won't go anywhere unless someone provides a patch.

--
nosy: +BreamoreBoy
versions: +Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1564508
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1564508] RFC 2965 BaseCookie does not support $Port

2009-05-27 Thread Ben Anhalt

Ben Anhalt ben.anh...@gmail.com added the comment:

Actually, I was just bit by this. In fact, RFC 2965 prohibits clients
from sending $Port if the port attribute was not included in the
Set-Cookie header.  But, it turns out that the mono System.Net library
(at least) will add the attribute any time the URI includes a
non-default port number. See http://go-mono.com/forums/#nabble-f1367  I
think this is technically their bug, but it might be nice to have
something like a non-strict mode in Cookie.py that would ignore
unexpected attributes for handling cases like this.

--
nosy: +benanhalt

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1564508
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1564508] RFC 2965 BaseCookie does not support $Port

2009-05-27 Thread Ben Anhalt

Ben Anhalt ben.anh...@gmail.com added the comment:

Grrr, the link in my last comment should have been
http://www.nabble.com/System.Net.CookieContainer-adding-inappropriate-%24Port-attribute-to-cookies--td23752882ef1367.html

Yuck.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1564508
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1564508] RFC 2965 BaseCookie does not support $Port

2009-02-12 Thread Daniel Diniz

Daniel Diniz aja...@gmail.com added the comment:

Does anybody else need this one or should it be closed?

--
nosy: +ajaksu2
title: BaseCookie does not support $Port - RFC 2965 BaseCookie does not 
support $Port
type:  - feature request

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1564508
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com