summaryrefslogtreecommitdiff
path: root/paste/wsgiwrappers.py
Commit message (Collapse)AuthorAgeFilesLines
* Python 3: Don't mangle strangely encoded inputNils Philippsen2015-08-191-1/+2
| | | | | | | | 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
* Merged in marsupial2k/paste (pull request #6)Marc Abramowitz2015-05-111-0/+1
|\ | | | | | | Add HTTP exception for new code 429 "Too Many Requests"
| * Add HTTP 429 "Too Many Requests"Neil Williams2011-12-231-0/+1
| | | | | | | | http://www.ietf.org/id/draft-nottingham-http-new-status-03.txt
* | Fix WSGIResponse on Python 3Victor Stinner2015-04-211-2/+3
| | | | | | | | | | | | | | | | | | | | | | HTTP body must be bytes. Don't check if __iter__() method to check if content is a list or tuple, because bytes and str now have this method on Python 3. Instead, check explicitly for bytes and str types using the six module. Port wsgiwrappers test to Python 3, fix bytes/unicode issues: * HTTP body must be bytes * Filenames are native strings, request ensures that filenames are unicode
* | Strip trailing spacesVictor Stinner2015-04-211-23/+23
| |
* | Python 3: use new style of raise, replace "raise class, args" with "raise ↵Cyril Roelandt2014-03-181-4/+4
| | | | | | | | class(args)"
* | Python 3: use new names of standard library modulesCyril Roelandt2014-03-181-1/+7
|/ | | | Use "try/except ImportError" to try Python 2 and Python 3 names.
* Add support for HttpOnly to Pasteianb2008-09-151-2/+2
|
* Fix wsgiwrappers delete_cookieianb2008-05-071-1/+1
|
* small docstring formatting fixesianb2008-04-271-1/+1
|
* typo in reprianb2008-03-261-1/+1
|
* Add 226 IM Used response status (#217)ianb2007-12-171-0/+1
|
* r6823 forgot _CHARSET_RE from WebOb and broke WSGIResponse'spjenvey2007-10-041-4/+4
| | | | content-type when charset was assigned
* Port WSGIResponse.content_type and .charset from WebObianb2007-08-101-0/+74
|
* o fixed WSGIResponse default headers only being inherited when a mimetype ↵pjenvey2007-07-141-2/+2
| | | | | | | | was specified o default WSGIRequest's decoding error handler to 'replace'. if sent bad data, it's more appropriate to just convert it to bad unicode data instead of raising an exception
* Fix bug in last commit, apply header defaults to WSGIResponse and default ↵bbangert2007-06-281-5/+3
| | | | cache-control to no-cache.
* By default, don't cache Response objects.bbangert2007-06-281-1/+4
|
* Fix for request.languages, which didn't pass the right value to httpheaders. ↵ianb2007-05-251-1/+1
| | | | Filter out empty languages from httpheaders.ACCEPT_LANGUAGE.
* Fix .urlvars to use wsgiorg.routing_argsianb2007-04-151-1/+13
|
* lowercasing 'UTF-8', as most docs use lowercase encoding namespjenvey2007-04-111-1/+1
|
* minor change to StackedObjectProxy's reprpjenvey2007-02-211-1/+1
|
* reindent r6247pjenvey2007-02-181-14/+13
|
* added WSGIRequest.__repr__pjenvey2007-02-181-0/+20
|
* added __all__pjenvey2007-02-151-0/+2
|
* Allow httpserver's readline to take an optional argument (max length) which ↵ianb2007-02-011-1/+1
| | | | the cgi module uses.
* Remove long-deprecated modules (most moved elsewhere -- actually removing ↵ianb2007-02-011-1/+1
| | | | now); move mimeparse to paste.util.mimeparse
* Switching mime-type parsing to be a WSGIRequest function instead of attribute.bbangert2007-01-311-20/+9
|
* Added WSGIRequest.mimetypes property and unit tests for it.bbangert2007-01-311-2/+20
|
* Added WSGIRequest.languages parameter which handles parsing of ↵bbangert2007-01-311-4/+41
| | | | Accept-Languages header and a unit test to verify the defaults.
* by default don't have WSGIRequest decode parameter keys when unicode params ↵pjenvey2007-01-221-8/+17
| | | | | | are expected. allow this behavior when WSGIRequest.decode_param_names is enabled
* small changespjenvey2007-01-221-6/+9
|
* o added UnicodeMultiDict, a MultiDict wrapper that decodes its retrievedpjenvey2007-01-211-46/+124
| | | | | | | | | | | | | contents to unicode on the fly. Any FieldStorages encountered are cloned with their name and filename fields decoded o Added WSGIRequest.charset and errors. When charset is set, WSGIRequest's params/GET/POST return UnicodeMultiDicts. charset and errors inherit their default values from the WSGIRequest.defaults StackedObjectProxy dict o deprecated wsgiwrappers.settings: use wsgiwrappers.WSGIResponse.defaults instead o allow WSGIResponse to let unicode responses pass through when no encoding is set (instead of defaulting to iso-8859-1). In case someone wants to deal with unicode later in their WSGI stack
* Fixed header assignment so value is assigned only if value is not None or ↵bbangert2006-11-021-1/+1
| | | | False. Reported by JJ. Fixes #131.
* A big commit, primarily aesthetic/whitespace in nature. This is the result ↵ianb2006-10-201-7/+8
| | | | of running pylint over the codebase. Some minor/hard-to-reach typos were also picked up.
* Removin the dict access, updating doc strings to indicate accurate methods.bbangert2006-10-171-17/+2
|
* Added dict access to WSGIResponse object, like the doc string indicates it ↵bbangert2006-10-171-0/+12
| | | | had the whole time.
* added needed whitespace after code-blockpjenvey2006-10-061-0/+1
|
* Added file handling capability to WSGIResponse's __call__ method, ↵bbangert2006-09-111-0/+5
| | | | self.content can be a file obj when using __call__ interface.
* Added __call__ method to WSGIResponse object that conforms to WSGI spec.bbangert2006-09-111-0/+23
|
* do a case insensitive match when determining WSGIResponse's charsetpjenvey2006-09-061-1/+1
|
* deprecating WSGIResponse.has_header for HeaderDict already does case ↵pjenvey2006-09-041-5/+5
| | | | insensitive matching
* o fixed WSGIResponse to determine the correct encoding after the Content-Typepjenvey2006-09-041-7/+14
| | | | | | header was changed o defaulting the WSGIResponse charset to iso-8859-1 as per RFC2616 o fixed HeaderDict's get and setdefault to be case insensitive
* o WSGIResponse changes:0.9.8pjenvey2006-09-041-30/+92
| | | | | | | | - properly encoding any unicode content according to the response's charset - handling generator/iterator content more cleanly - fixed delete_cookie. also now takes optional path and domain args o added wsgilib.encode_unicode_app_iter: encodes an app_iterable's unicode responses as strings
* Adding module doc for wsgiwrappers.bbangert2006-09-021-0/+5
|
* use headeritems() instead of items() in WSGIResponse.pjenvey2006-08-301-2/+2
| | | | thanks jaq
* Fixing requested_with header name.bbangert2006-08-211-1/+1
|
* Fix bug in is_xhr, should be HTTP_ header.bbangert2006-08-201-1/+1
|
* Changed request.xhr to request.is_xhr which is a bool function thats true if ↵bbangert2006-08-201-1/+5
| | | | X-Requested-With is present and equal to XMLHttpRequest.
* Adding xhr attribute to WSGIRequest object.bbangert2006-08-201-0/+1
|
* renamed the multidict class to MultiDictpjenvey2006-07-251-3/+3
|