Changeset 391 for python/trunk/Lib/cgi.py
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Lib/cgi.py
r10 r391 38 38 import sys 39 39 import os 40 import urllib41 40 import UserDict 42 41 import urlparse … … 46 45 if sys.py3kwarning: 47 46 filterwarnings("ignore", ".*mimetools has been removed", 48 DeprecationWarning) 47 DeprecationWarning) 48 filterwarnings("ignore", ".*rfc822 has been removed", 49 DeprecationWarning) 49 50 import mimetools 50 if sys.py3kwarning:51 filterwarnings("ignore", ".*rfc822 has been removed", DeprecationWarning)52 51 import rfc822 53 52 … … 133 132 134 133 keep_blank_values: flag indicating whether blank values in 135 URLencoded forms should be treated as blank strings.134 percent-encoded forms should be treated as blank strings. 136 135 A true value indicates that blanks should be retained as 137 136 blank strings. The default false value indicates that … … 173 172 qs = "" 174 173 environ['QUERY_STRING'] = qs # XXX Shouldn't, really 175 return parse_qs(qs, keep_blank_values, strict_parsing)174 return urlparse.parse_qs(qs, keep_blank_values, strict_parsing) 176 175 177 176 … … 181 180 def parse_qs(qs, keep_blank_values=0, strict_parsing=0): 182 181 """Parse a query given as a string argument.""" 183 warn("cgi.parse_qs is deprecated, use urlparse.parse_qs \184 instead",PendingDeprecationWarning, 2)182 warn("cgi.parse_qs is deprecated, use urlparse.parse_qs instead", 183 PendingDeprecationWarning, 2) 185 184 return urlparse.parse_qs(qs, keep_blank_values, strict_parsing) 186 185 … … 294 293 s = s[1:] 295 294 end = s.find(';') 296 while end > 0 and s.count('"', 0, end) % 2:295 while end > 0 and (s.count('"', 0, end) - s.count('\\"', 0, end)) % 2: 297 296 end = s.find(';', end + 1) 298 297 if end < 0: … … 412 411 413 412 keep_blank_values: flag indicating whether blank values in 414 URLencoded forms should be treated as blank strings.413 percent-encoded forms should be treated as blank strings. 415 414 A true value indicates that blanks should be retained as 416 415 blank strings. The default false value indicates that … … 699 698 self.done = -1 700 699 break 700 if delim == "\r": 701 line = delim + line 702 delim = "" 701 703 if line[:2] == "--" and last_line_lfend: 702 704 strippedline = line.strip() … … 715 717 line = line[:-1] 716 718 last_line_lfend = True 719 elif line[-1] == "\r": 720 # We may interrupt \r\n sequences if they span the 2**16 721 # byte boundary 722 delim = "\r" 723 line = line[:-1] 724 last_line_lfend = False 717 725 else: 718 726 delim = ""
Note:
See TracChangeset
for help on using the changeset viewer.