[issue17340] Handle malformed cookie

2013-03-09 Thread Luke Plant
Luke Plant added the comment: I'm a core developer on Django, and I've looked into cookies a lot, and also Python's SimpleCookie, and I've found that all accepted RFCs are completely irrelevant for this issue. No accepted RFC was ever widely implemented - instead browsers mainly did

[issue2193] Cookie Colon Name Bug

2011-09-24 Thread Luke Plant
Luke Plant l.plant...@cantab.net added the comment: David, Thanks again for the time on this. Can I push to get the patches included, or is there work that still needs to be done on the patches now that the idea is accepted in principle? I did experiment with a few approaches to implement

[issue2193] Cookie Colon Name Bug

2011-06-29 Thread Luke Plant
Luke Plant l.plant...@cantab.net added the comment: First, I agree with others who say that RFCs are basically irrelevant for cookies. For Django we've discovered this in various ways e.g. issue 9824 - http://bugs.python.org/issue9824 - which has now been applied. We have also had to work

[issue2193] Cookie Colon Name Bug

2011-06-29 Thread Luke Plant
Luke Plant l.plant...@cantab.net added the comment: Same patch backported to python 2.7 branch -- Added file: http://bugs.python.org/file22514/issue2193_patch_python27.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2193

[issue2193] Cookie Colon Name Bug

2011-06-29 Thread Luke Plant
Luke Plant l.plant...@cantab.net added the comment: Found a bug with patch - this supersedes old one. -- Added file: http://bugs.python.org/file22515/issue2193_patch_2_trunk.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue2193] Cookie Colon Name Bug

2011-06-29 Thread Luke Plant
Luke Plant l.plant...@cantab.net added the comment: Same against Python 2.7 -- Added file: http://bugs.python.org/file22516/issue2193_patch_2_python27.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2193

[issue2193] Cookie Colon Name Bug

2011-06-29 Thread Luke Plant
Changes by Luke Plant l.plant...@cantab.net: Removed file: http://bugs.python.org/file22513/issue2193_patch_trunk.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2193

[issue2193] Cookie Colon Name Bug

2011-06-29 Thread Luke Plant
Changes by Luke Plant l.plant...@cantab.net: Removed file: http://bugs.python.org/file22514/issue2193_patch_python27.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2193

[issue2193] Cookie Colon Name Bug

2011-06-29 Thread Luke Plant
Luke Plant l.plant...@cantab.net added the comment: I had a quick look, and there are these relevant bits: There are two audiences for this specification: developers of cookie-generating servers and developers of cookie-consuming user agents. And: To maximize interoperability with user

[issue2193] Cookie Colon Name Bug

2011-06-29 Thread Luke Plant
Luke Plant l.plant...@cantab.net added the comment: @ David Murray: Thanks for taking the time to look at this - can I trouble you to keep going and read my response? Thanks. You wrote: IMO the thing that needs to be fixed here is that receiving an invalid cookie makes it difficult

[issue11001] Various obvious errors in cookies documentation

2011-01-24 Thread Luke Plant
New submission from Luke Plant l.plant...@cantab.net: Docs for SimpleCookie, BaseCookie.value_encode and BaseCookie.value_decode are obviously incorrect. Attempt at patch attached. The error has existed in every Python version I've seen, I've tagged the ones I believe can receive fixes

[issue9824] SimpleCookie should escape commas and semi-colons

2010-09-10 Thread Luke Plant
New submission from Luke Plant l.plant...@cantab.net: In developing Django, we found that some browsers don't treat commas and semi-colons in cookie values (i.e. the Set-Cookie header) the way that RFC 2109 says they should. (Safari splits the header on a comma followed by space, Internet

[issue9824] SimpleCookie should escape commas and semi-colons

2010-09-10 Thread Luke Plant
Luke Plant l.plant...@cantab.net added the comment: I forgot to mention backwards compatibility: In the context of Cookie being used in a web application, if developers were relying on literal commas and semi-colons being present in the client side cookie value (e.g. in javascript), the patch

Re: Reference Variables In Python Like Those In PHP

2006-08-15 Thread Luke Plant
Chaos wrote: Is It possible to have reference variables like in PHP ... Is this available in python? You should note that, to a nearest equivalent, all variables are reference variables in Python. The difference is in what assignment does - += in Python does an assignment of a new object

Re: Detupleize a tuple for argument list

2006-07-05 Thread Luke Plant
Marco Wahl wrote: Hi, I want to give a tuple to a function where the function expects the respective tuple-size number of arguments. ... One way to do what I want is--of course--to call foo(t[0], t[1]). My actual question is if there is a smarter way to do it. Yes, just this: foo(*t)

Re: hi,every body. a problem with PyQt.

2006-05-24 Thread Luke Plant
i use QT-designer to design application GUI. now i save the test.ui file into e:\test\test.ui next step,how can i run it? You should have a look at a PyQt tutorial, such as this one: http://vizzzion.org/?id=pyqt Luke -- http://mail.python.org/mailman/listinfo/python-list

Re: Help! Identical code doesn't work in Wing IDE but does in Komodo.

2006-04-20 Thread Luke Plant
With the exact same line of code in Komodo I get the correct output which is Sample Feed Any idea what's wrong? My guess would be different PYTHONPATHs. Try this on each: import sys print sys.path They might even be using different python versions - but both of these are just guesses.

Re: Initializing defaults to module variables

2006-04-13 Thread Luke Plant
Burton Samograd wrote: My question is, how can I setup my program defaults so that they can be overwritten by the configuration variables in the user file (and so I don't have to scatter default values all over my code in try/catch blocks)? The Django web framework happens to do something

Re: make a class instance from a string ?

2006-02-23 Thread Luke Plant
Bo Yang wrote: I know in java , we can use class.ForName(classname) to get an instance of the class 'classname' from a string , in python , how do I do that ? In Python, classes are first class objects, so normally you would pass the class itself around, rather than use the names of