[Zope-Checkins] CVS: Zope/lib/python/ZPublisher - BaseResponse.py:1.17 HTTPRequest.py:1.80 HTTPResponse.py:1.69

Chris McDonough chrism@zope.com
Tue, 20 Aug 2002 23:09:32 -0400


Update of /cvs-repository/Zope/lib/python/ZPublisher
In directory cvs.zope.org:/tmp/cvs-serv25772/ZPublisher

Modified Files:
	BaseResponse.py HTTPRequest.py HTTPResponse.py 
Log Message:
De-applying patches to autoquote cookie values due to fears of breakage
and lack of coverage in the code.


=== Zope/lib/python/ZPublisher/BaseResponse.py 1.16 => 1.17 ===
--- Zope/lib/python/ZPublisher/BaseResponse.py:1.16	Wed Aug 14 18:09:40 2002
+++ Zope/lib/python/ZPublisher/BaseResponse.py	Tue Aug 20 23:09:31 2002
@@ -16,7 +16,6 @@
 __version__ = '$Revision$'[11:-2]
 
 import  types, sys
-from urllib import quote_plus
 from types import StringType, InstanceType
 from zExceptions import Unauthorized
 
@@ -72,10 +71,6 @@
         cookie-enabled browsers with a key "name" and value
         "value". This overwrites any previously set value for the
         cookie in the Response object.
-
-        The value is quoted using urllib's url_quote_plus, which
-        quoting will be undone when the value is accessed through
-        REQUEST in a later transaction.
         '''
         cookies = self.cookies
         if cookies.has_key(name):
@@ -84,7 +79,7 @@
             cookie = cookies[name] = {}
         for k, v in kw.items():
             cookie[k] = v
-        cookie['value'] = quote_plus(value)
+        cookie['value'] = value
 
     def appendBody(self, body):
         self.setBody(self.getBody() + body)


=== Zope/lib/python/ZPublisher/HTTPRequest.py 1.79 => 1.80 ===
--- Zope/lib/python/ZPublisher/HTTPRequest.py:1.79	Wed Aug 14 18:09:40 2002
+++ Zope/lib/python/ZPublisher/HTTPRequest.py	Tue Aug 20 23:09:31 2002
@@ -17,7 +17,7 @@
 from BaseRequest import BaseRequest
 from HTTPResponse import HTTPResponse
 from cgi import FieldStorage, escape
-from urllib import quote, unquote, unquote_plus, splittype, splitport
+from urllib import quote, unquote, splittype, splitport
 from copy import deepcopy
 from Converters import get_converter
 from TaintedString import TaintedString
@@ -1458,7 +1458,7 @@
 
     finally: release()
 
-    if not already_have(name): result[name]=unquote_plus(value)
+    if not already_have(name): result[name]=value
 
     return apply(parse_cookie,(text[l:],result))
 


=== Zope/lib/python/ZPublisher/HTTPResponse.py 1.68 => 1.69 ===
--- Zope/lib/python/ZPublisher/HTTPResponse.py:1.68	Wed Aug 14 18:09:40 2002
+++ Zope/lib/python/ZPublisher/HTTPResponse.py	Tue Aug 20 23:09:31 2002
@@ -17,7 +17,6 @@
 
 import types, os, sys, re
 import zlib, struct
-from urllib import quote_plus
 from string import translate, maketrans
 from types import StringType, InstanceType, LongType, UnicodeType
 from BaseResponse import BaseResponse
@@ -492,10 +491,6 @@
         cookie-enabled browsers with a key "name" and value
         "value". This overwrites any previously set value for the
         cookie in the Response object.
-
-        The value is quoted using urllib's url_quote_plus, which
-        quoting will be undone when the value is accessed through
-        REQUEST in a later transaction.
         '''
         cookies = self.cookies
         if cookies.has_key(name):
@@ -504,7 +499,7 @@
             cookie = cookies[name] = {}
         for k, v in kw.items():
             cookie[k] = v
-        cookie['value'] = quote_plus(value)
+        cookie['value'] = value
 
     def appendHeader(self, name, value, delimiter=","):
         '''\