summaryrefslogtreecommitdiff
path: root/paste/request.py
Commit message (Collapse)AuthorAgeFilesLines
* Python 3: Don't mangle strangely encoded inputNils Philippsen2015-08-191-2/+9
| | | | | | | | In Python 3, cgi.FieldStorage needs to know about encodings like shiftjis in order to decode it properly (in Python 2 it's simply not decoded at all). Fixes tests.test_wsgiwrappers.test_wsgirequest_charset
* Replace cgi.parse_qsl w/ six.moves.urllib.parse.parse_sqleliminate_cgi_parse_qsl_2eliminate_cgi_parse_qslMarc Abramowitz2015-04-301-5/+5
| | | | | because `cgi.parse_qsl` is deprecated, according to https://docs.python.org/2/library/cgi.html#cgi.parse_qsl
* Fix paste.request on Python 3Victor Stinner2015-04-211-2/+5
| | | | | | | WSGI input must be a binary file (BytesIO), not a text file (StringIO). Add also the missing __len__() method to EnvironHeaders, it's now required on Python 3 by the MutableMapping ABC.
* Strip trailing spacesVictor Stinner2015-04-211-3/+3
|
* Python 3: fix more submodulesVictor Stinner2014-03-191-2/+2
| | | | | * print syntax * replace "except Exception, exc:" with "except Exception as exc:"
* Python 3: Replace "dict.has_key(key)" with "key in dict"Cyril Roelandt2014-03-181-2/+2
|
* Python 3: use new names of standard library modulesCyril Roelandt2014-03-181-9/+16
| | | | Use "try/except ImportError" to try Python 2 and Python 3 names.
* Catch cookie errors when parsing cookies ↵Ian Bicking2010-09-021-3/+9
| | | | (http://trac.pythonpaste.org/pythonpaste/ticket/189)
* avoid unnecessary ports in URL constructionianb2007-04-171-1/+13
|
* Fix for #167ianb2007-04-111-1/+1
|
* Add most doctests to the automatic testing; fix some problems in testsianb2007-02-011-2/+2
|
* doc markuppjenvey2007-01-211-1/+1
|
* no need to check content type for startswith('multipart/form-data') as of ↵pjenvey2007-01-171-2/+2
| | | | r5936/r5937
* CONTENT_LENGTH/Content-Length fix in HeaderDictianb2007-01-161-12/+25
|
* typo in last commitianb2007-01-041-1/+1
|
* Respect HTTP_HOST over SERVER_PORT in construct_urlianb2007-01-041-8/+7
|
* fixed parse_dict_querystring returning empty dicts instead of MultiDictspjenvey2006-12-221-1/+1
|
* Quote SCRIPT_NAME and PATH_INFO in construct_url and when forwarding the ↵ianb2006-12-181-4/+5
| | | | request via the proxy
* Handle case when CONTENT_LENGTH is empty string (which cgi.FieldStorage ↵ianb2006-11-261-1/+2
| | | | treats the same as missing)
* Use a default CONTENT_LENGTH of 0ianb2006-11-261-0/+3
|
* Fix last commit (CONTENT_TYPE), newsianb2006-11-261-1/+1
|
* Handle request CONTENT_TYPE with parameters (e.g., charset=X). prototype.js ↵ianb2006-11-261-2/+4
| | | | sets this on requests
* A big commit, primarily aesthetic/whitespace in nature. This is the result ↵ianb2006-10-201-2/+4
| | | | of running pylint over the codebase. Some minor/hard-to-reach typos were also picked up.
* changes to QUERY_STRING shouldn't trigger reparsing of formvars:pjenvey2006-10-201-4/+4
| | | | | | no longer caching QUERY_STRING vars together with parsed_formvars (parse_querystring caches them anyway) nor using QUERY_STRING information as cache keys
* Patch cgi.FieldStorage.__repr__ to not be brain dead.cce2006-09-261-0/+14
|
* fixing parse_formvars to permit missing QUERY_STRING, whichcce2006-09-031-1/+1
| | | | is permitted by the WSGI specification
* Updated form var caching so that the REQUEST_METHOD is not part of the cache ↵bbangert2006-08-211-1/+1
| | | | key.
* renamed the multidict class to MultiDictpjenvey2006-07-251-6/+6
|
* o request.parse_formvars changes:pjenvey2006-07-241-41/+22
| | | | | | | | | | | | - now returns a multidict instead of dict (like parse_dict_querystring) - removed all_as_list keyword arg: use multidict.mixed() instead to produce an all_as_list dict - preventing FieldStorage from parsing out QUERY_STRING during GET/HEAD requests - the fake_out_cgi check wasn't careful enough about multipart/form-data content-types. Was also missing a StringIO import (r5471 broke file uploads) o evalexception's wsgiapp decorator assumed parse_formvars would return GET vars during a GET (buggy behavior), now it explicitly asks for them
* Keep wsgi.input from being eaten when the cgi module is looking for POST ↵ianb2006-07-201-1/+15
| | | | variables
* Changed usage of MultiDict to util.multidictianb2006-07-191-30/+3
|
* made MultiDict iterablepjenvey2006-06-201-2/+2
|
* Added copyright header to a bunch of filesianb2006-06-131-0/+2
|
* fix for non-form POSTs, putting all the variables in __body__ianb2006-05-071-15/+24
|
* Moved WSGIRequest from request -> wsgiwrappers. Created WSGIResponse object ↵bbangert2006-03-191-126/+1
| | | | in wsgiwrappers.
* Fixed bug with WSGIRequest paramsbbangert2006-03-191-2/+2
|
* Added a get_cookie_headers function; added a dictionary-like object that ↵ianb2006-03-131-34/+84
| | | | dynamically reads headers from the WSGI environment; altered request object to cache a little less (still more to remove); made urlvars a request value
* Fixed WSGIRequest not parsing right, updating unit tests for WSGIRequestbbangert2006-03-131-18/+10
|
* Fixed headers propertybbangert2006-03-091-4/+3
|
* Added body, headers prototypebbangert2006-03-091-3/+9
|
* Added cookies and urlvars to WSGIRequestbbangert2006-03-091-5/+10
|
* Updated to be a bit more simple since only retrieving was neededbbangert2006-03-091-82/+65
|
* - removing trailing spacescce2006-03-091-47/+51
| | | | - fixing wrap to fit within 80 cols
* Using textwrap to remove indentation from doc strings for propertiesbbangert2006-03-091-26/+31
|
* Fixed properties for WSGIRequest, added multidict. Caution, still needs to ↵bbangert2006-03-091-24/+44
| | | | be tested
* Should now be handling form/get args properlybbangert2006-03-091-13/+31
|
* Fixed improper name of WSGIRequest objectbbangert2006-03-081-2/+2
|
* Fixed doc style to conform to PEP8/257. Added WSGIRequest object, added ↵bbangert2006-03-081-6/+181
| | | | parse_dict_querystring.
* Added a method to resolve a relative URI in the context of a WSGI request ↵ianb2006-01-271-1/+15
| | | | (urljoin+construct_url)
* Added a request.parse_headers() function for incoming requests environment ↵ianb2006-01-221-0/+19
| | | | mapped to headers. (Should there also be a lazy option that reads the dictionary live from an environment?)