CherryPy / _cprequest.py

Author Commit Message Labels Comments Date
Robert Brewer avatarRobert Brewer
Lots of mixedCase to lower_with_underscores.
Branches
cherrypy
Robert Brewer avatarRobert Brewer
Changed LateParamPageHandler to use a property instead of __getattribute__ (thanks, michele!) and added a docstring.
Branches
cherrypy
Robert Brewer avatarRobert Brewer
New deadlock monitor which sets Response.timed_out to True if Response.time < now - config.get("deadlock_timeout"). The request thread periodically checkes Response.timed_out and raises TimeoutError if it is True. Current checks are in HookMap.run, Request.respond, Body.__set__, and Response.finalize, more can be added later if needed.
Branches
cherrypy
Robert Brewer avatarRobert Brewer
Moved request.handler from a function (with vpath, and request.params included in cell refs) to an instance of a callable PageHandler class (with vpath, params included as .args, .kwargs attributes). Instances of HTTPRedirect and HTTPError (including NotFound) can now also be set directly as request.handler (they raise self when called).
Branches
cherrypy
Robert Brewer avatarRobert Brewer
Replaced request.remote_addr, remote_port, and remote_host with a single "remote" attribute, an instance of lib.http.Host, which has "ip", "port" and "name" attributes. Added a similar request.local attribute. Changed request() signature to (local, remote, scheme). This allows requests run behind multiple HTTP servers to know the address info for their particular connection.
Branches
cherrypy
Robert Brewer avatarRobert Brewer
WSGI-related changes:
Branches
cherrypy
Robert Brewer avatarRobert Brewer
Split process_request_body into two flags instead (new request.body_read flag to signal that the request body has already been read).
Branches
cherrypy
Robert Brewer avatarRobert Brewer
Eliminated 'default_content_type' config entry by moving tools.response_headers to on_start_resource. If anyone still needs response headers to be set late, they can call tools.response_headers later, either in code or via a hook declared in config.
Branches
cherrypy
Robert Brewer avatarRobert Brewer
Fixes for #544 and #545 (serveFile issues) in CP 3. Fixes in CP 2 branch coming in a separate changeset.
Branches
cherrypy
Robert Brewer avatarRobert Brewer
More work on tools.expires:
Branches
cherrypy
Robert Brewer avatarRobert Brewer
Various speedups, the only notable one being that environments are now always flattened as soon as possible.
Branches
cherrypy
Robert Brewer avatarRobert Brewer
Moved RFC 2047 encoding into http.HeaderMap. Changed HeaderMap.sorted_list to HeaderMap.output (which does not sort).
Branches
cherrypy
Robert Brewer avatarRobert Brewer
Moved profiling into WSGI middleware.
Branches
cherrypy
Robert Brewer avatarRobert Brewer
New _cpwsgi.make_app function for creating isolated WSGI application callables. You should only need to use it if two WSGI apps share the same script_name, or if you use a WSGI tool which expects a separate callable for each app.
Branches
cherrypy
Robert Brewer avatarRobert Brewer
Since request.headers converts case automatically, there's no need to transform it to lowercase to pass to FieldStorage.
Branches
cherrypy
Robert Brewer avatarRobert Brewer
Fix for #528 (Allow request body parsing for methods other than "POST" and "PUT").
Branches
cherrypy
Robert Brewer avatarRobert Brewer
Buglets.
Branches
cherrypy
Robert Brewer avatarRobert Brewer
encode_TEXT only for HTTP/1.1 response headers, and verify folded response headers start with linear whitespace.
Branches
cherrypy
Robert Brewer avatarRobert Brewer
Added support for RFC 2047 encoding and decoding of header values.
Branches
cherrypy
Robert Brewer avatarRobert Brewer
Finally a clean fix for #102 (Dispatch to different page handlers based on HTTP method).
Branches
cherrypy
Robert Brewer avatarRobert Brewer
Niggly bits.
Branches
cherrypy
Robert Brewer avatarRobert Brewer
New hooks namespace in config, for attaching arbitrary hooks to requests. See test_tools for an example.
Branches
cherrypy
Robert Brewer avatarRobert Brewer
Made cherrypy.request and .response more sef-documenting by populating their attribute dicts outside a request.
Branches
cherrypy
Robert Brewer avatarRobert Brewer
Heavily cleaned the namespace for Tool objects:
Branches
cherrypy
Robert Brewer avatarRobert Brewer
Removed the wrap method from Tool, since the enable method should meet all cases better. Also fixed a bug where request.hooks was not being reinitialized on internalredirect. Also added code to guard against recursive internalredirects. Finally, fixed a couple of dict iterations that were missing iteritems.
Branches
cherrypy
Robert Brewer avatarRobert Brewer
Renamed httptools to "http" to reduce confusion with new cherrypy.tools. Moved non-Tool-related code from cptools to {{{lib/__init__}}}. Added docstrings.
Branches
cherrypy
Robert Brewer avatarRobert Brewer
Got rid of _cperror.Error base class, and "from _cperror import *" in top level.
Branches
cherrypy
Robert Brewer avatarRobert Brewer
httptools.Version was overengineered. Shame on me. Using tuples gives a 2-3% speed boost.
Branches
cherrypy
Robert Brewer avatarRobert Brewer
Sometimes I really hate .pyc's
Branches
cherrypy
Robert Brewer avatarRobert Brewer
Merged _cputil into _cprequest.
Branches
cherrypy
  1. Prev
  2. 1
  3. 2
  4. Next
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.