| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
1. Now takes 'secs' arg instead of 'e_time'.
2. The 'force' arg defaults to False now.
3. Set 'force' to True to imply ignore_indicators.
4. New cherrypy.reponse.time attribute: the time.time() which is used for the 'Date' response header.
|
| |
|
|
|
|
| |
Moved non-Tool-related code from cptools to {{{lib/__init__}}}. Added docstrings.
|
|
|
|
| |
module to _cptools, and binding cherrypy tools to a new _cptools.default_toolbox object. Also cleaned up the top-level cherrypy namespace quite a bit, and moved some user code out of lib.cptools.
|
|
|
|
| |
_cprequest, and consolidated toolmap and tool setup into a new Request.tool_up method.
|
| |
|
| |
|
|
|
|
| |
request (unless InternalRedirect is raised). Also moved the logging code out of {{{_cputil}}} and into {{{__init__}}}. xmlrpc still needs fixed so it doesn't re-write path_info.
|
|
|
|
|
|
|
|
|
|
|
| |
1. object_path is now called path_info, and there's a new request.script_name attribute. This should equal the mount point of the current application.
2. cherrypy.root is gone, use cherrypy.request.app.root for now instead. Perhaps cherrypy.root will reappear and point to that.
3. cherrypy.tree.mount_points has been replaced with cherrypy.tree.apps, a dict of the form {script_name: Application(root, conf)}.
4. The [global] config namespace is now contained in a flat cherrypy.config.globalconf dict.
5. Got rid of handling favicon.ico and the "*" URI (although they may return someday).
6. Upshot is that e.g. test_objectmapping.py takes 1/3 the time as CP 2.2.
7. Moved request body size check into _cprequest from _cpwsgi.
8. Fixed lib/wsgiapp and made a tool for it.
|
|
|
|
|
|
|
|
|
|
|
| |
1. Removed RequestHandled and InternalError.
2. Error response is now overridable by replacing request.error_response. Tools should do this in setup().
3. New request.log_access attribute.
4. Moved response.handleError to request.handle_error.
5. Logging of tracebacks and request headers are now tools.
6. New ErrorRedirect tool class.
7. Tools may now be anonymous (not necessary to be placed in tools module globals).
8. Continued the move to lower_with_underscores.
|
| |
|
|
|
|
|
|
|
| |
1. I'll look at replacing _cp_on_error with Tools some other day.
2. Moved the HookMap into tools.py.
3. New config.current_config function.
4. static.serve_file now sets body even if not modified_since.
|
| |
|
| |
|
|
|
|
| |
test_response_headers_filter.py
|
|
|
|
| |
Lots of renaming and reorg of modules.
|
|
|
|
| |
config files.
|
|
|
|
|
|
|
|
|
|
|
| |
the WSGIAppFilter is no longer configurable through the CP config
system. You should either add an instance of
cherrypy.filters.wsgiappfilter.WSGIAppFilter to your _cp_filters
list or use the cherrypy.lib.cptools.WSGIApp convenience class.
Also tweaked the test for wsgiappfilter to make sure that static
content higher than a WSGI application on the tree gets served
correctly.
|
| |
|
| |
|
|
|
|
| |
file has been modified since a given date
|
| |
|
|
|
|
| |
config entry.
|
|
|
|
| |
the book)
|
| |
|
|
|
|
|
|
| |
1. Now *anytime* you set body it will coerce it to an iterable, so code outside Request.main doesn't have to be as careful/aware of how to do that.
2. New response.collapse_body() function, which collapses the body into a single new_body string, sets response.body to [new_body], and returns new_body.
3. New request.executeMain flag (bool), to govern whether Request.main method is called. This replaces the old behavior, where main would be called "if response.body is None". There may be custom beforeMain filters which depend on the old behavior, and need to be updated to set request.executeMain = False.
|
|
|
|
| |
and modules(), attributes() functions into cptools.
|
|
|
|
| |
new module does not reference cherrypy (and should never do so). Think of it as the httptools module Python should distribute. ;)
|
| |
|
|
|
|
| |
cptools.getAccept function, which returns a list of AcceptValue objects (sorted in descending priority). GzipFilter rewritten to use it.
|
|
|
|
| |
parseRequestLine, parseQueryString, paramsFromCGIForm. This should help filter authors and others re-use some of the nuts and bolts of CP.
|
| |
|
|
|
|
| |
server.logFileNotFound boolean.
|
|
|
|
| |
of request.path has been changed to inspect request.objectPath instead (the "rewritten path"). The request.path should never be rewritten; instead, it should only be used to generate new URL's based on the original path. The request.originalPath attribute can now probably be deprecated.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
1. _cphttptools.checkStatus moved to lib.cptools.validStatus. Illegal status codes now raise HTTPError(500) with custom messages.
2. _cputil.responseCodes moved into cptools.
3. _cpOnError logic *all* moved into HTTPError.set_response.
4. _cputil.getErrorStatusAndPage changed to getErrorPage.
5. Made _cputil._HTTPErrorTemplate into a string instead of a function, which the new getErrorPage interpolates with its own **kwargs.
6. HTTPError now properly takes a "message" arg instead of a "body" arg. Specify alternate body via errorPage.4xx config entry (overriding _HTTPErrorTemplate).
7. HTTPError now allows str statuses, to allow arbitrary reason-phrases.
8. assertErrorPage in helper.py updated to match core changes.
|
|
|
|
| |
for cptools.serveFile.
|
|
|
|
|
|
| |
#318: streaming output is now off by default. This means you may now use "yield" without worrying about pre-determining the status and headers. To enable streaming output you must set the config entry "streamResponse" to True. You should probably also use "yield", since it doesn't make much sense to stream a single chunk.
#322: HTTP/1.0 requests may now stream their output.
#323: moved request.version to response.version. Also, made sure Range headers are not read or written unless response.version >= 1.1.
|
|
|
|
| |
assertErrorPage to CPWebCase
|
|
|
|
| |
documentation
|
|
|
|
| |
error code.
|
|
|
|
| |
to cptools (now HTTPDate, serveFile, and getRanges). serveFile has new contentType, disposition, and name arguments, and now returns cherrypy.response.body.
|
|
|
|
| |
more "raise Exception" or "raise Exception, arg". See http://mail.python.org/pipermail/python-dev/2005-August/055687.html for Guido's pronouncement, which is now part of PEP 8.
|
|
|
|
|
| |
2. Moved modules, attributes functions from server.py to _cputil.py.
3. A couple of newline fixes for unrelated modules.
|
| |
|
| |
|
|
|
|
| |
flaw.
|
| |
|
| |
|