Question about setCookie()
Hello, I just started using setCookie() for the first time, and noticed it likes to put all my values in double quotes! I went to quickly read RFC2109, and I don't see anything suggesting values should be quoted at all. This is a problem for me as it breaks the design specs of a distributed application framework I'm working with that sets cookies without the double quotes. Any way around this? Can I safely alter the HTTPResponse.py code to remove them? Thanks, Jean-François Doyon Internet Service Development and Systems Support / Soutien de systèmes et developement de services Internet GeoAccess Division / Division GéoAccès Canada Center for Remote Sensing / Centre canadien de télédétection Natural Resources Canada / Ressources naturelles Canada Phone / Téléphone: (613) 992-4902 Fax / Télécopieur: (613) 947-2410 http://atlas.gc.ca
Jean-Francois.Doyon@CCRS.NRCan.gc.ca wrote:
Hello,
I just started using setCookie() for the first time, and noticed it likes to put all my values in double quotes!
Annoying, isn't it?
I went to quickly read RFC2109, and I don't see anything suggesting values should be quoted at all.
Yup
This is a problem for me as it breaks the design specs of a distributed application framework I'm working with that sets cookies without the double quotes.
Any way around this? Can I safely alter the HTTPResponse.py code to remove them?
Just set the cookies with Response.setHeader, or write an python script called setCookie which does the right thing, and put it in your zope root. cheers, oliver
Jean-Francois.Doyon@CCRS.NRCan.gc.ca wrote:
I just started using setCookie() for the first time, and noticed it likes to put all my values in double quotes!
indeed, http://collector.zope.org/Zope/569
I went to quickly read RFC2109, and I don't see anything suggesting values should be quoted at all.
section 4.1 note the definition of word, but thats not really all that big a deal as almost no browser follows the RFCs anyway, the Netscape Cookie "standard" still rules on high afaict.
Any way around this? Can I safely alter the HTTPResponse.py code to remove them?
probably, but don't forget the regex that strips them off when present, that'll need to be altered too -- Jamie Heilman http://audible.transient.net/~jamie/ "Paranoia is a disease unto itself, and may I add, the person standing next to you may not be who they appear to be, so take precaution." -Sathington Willoughby
participants (3)
-
Jamie Heilman -
Jean-Francois.Doyon@CCRS.NRCan.gc.ca -
Oliver Bleutgen