summaryrefslogtreecommitdiff
path: root/cherrypy/lib/static.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Docstring updates.Robert Brewer2008-06-041-2/+25
|
* Doc tweak.Robert Brewer2008-05-151-1/+2
|
* Moved mimetools to only import if needed.Robert Brewer2008-03-141-1/+1
|
* Static tool: allow the use of ~ as a placeholder for a the user's home ↵Lakin Wecker2007-10-161-0/+3
| | | | directory in the path names.
* Fix for #689 (add equivalent of trailing_slash tool for static content). The ↵Robert Brewer2007-06-161-1/+3
| | | | staticdir tool now sets request.is_index if needed. The trailing_slash tool priority was increased to allow most before_handler tools a chance to set is_index.
* Trunk fix for #577 (GzipFilter doesn't force an update of the Content-Length ↵Robert Brewer2006-10-201-2/+4
| | | | header). All code which could change the length of response.body should delete the Content-Length header (if already set).
* Inline isdir to save a call to os.stat.Robert Brewer2006-10-191-4/+6
|
* Fix to 2.1, 2.2, 3.0 for bugs in Range slicing and final boundary. Also made ↵Robert Brewer2006-09-021-5/+11
| | | | the output match Apache output (CRLFs).
* API and docstring cleanups:Robert Brewer2006-08-261-2/+2
| | | | | | | | 1. Removed WrongConfigValue, decorate, decorate_all, and ExposeItems. 2. Moved cherrypy.logtime to cherrypy.log.time. 3. Reduced cherrypy.config.globalconf back to just cherrypy.config. 4. Moved _cpconfig.default_conf to config.defaults. .
* Overhaul of config system:Robert Brewer2006-08-241-2/+0
| | | | | | | | | | | | | | | | | 1. New docstring for config module! 2. Put all entries into a config namespace. New deadlock, log, request and response namespaces. 3. Request and response entries now directly modify attributes of cherrypy.request and .response, and consumer code looks up those attributes, not config. This also allows interactive inspection of defaults. 4. Removed 'log_config' config entry. Use engine.on_start_engine_list.append(config.log_config) instead. 5. Old 'dispatch' entry is now 'request.dispatch'. 6. New log entries: log.error.file, log.error.function, log.access.file, log.access.function, log.screen. 7. 'server.max_request_body_size' is now 'request.max_body_size'. 8. environments now only apply to globalconf. 9. The 'development' environment has been removed, since its settings were all the default anyway. 10. The 'embedded' environment has been removed, since it duplicates the 'production' environment now. 11. There's a new 'test_suite' environment. 12. Removed log_file_not_found (from static.py). Something still needs to be done to config.wrap, so it can take dotted names as kwarg keys.
* Lots of mixedCase to lower_with_underscores.Robert Brewer2006-08-121-3/+3
|
* Fix for #547 (serve_file still uses contentType instead of content_type). ↵Robert Brewer2006-08-121-7/+7
| | | | Thanks, michele!
* WSGI-related changes:Robert Brewer2006-08-071-1/+1
| | | | | | | 1. Changed Request.run from request_line arg to deconstructed args: method, path, query_string, and protocol. 2. Moved HTTP protocol checking from _cprequest to _cpwsgiserver. What was cherrypy.response.version is now cherrypy.request.protocol (tuple form of SERVER_PROTOCOL). request.version and response.version attributes removed. _cpwsgiserver now writes out server.protocol, not SERVER_PROTOCOL (which is a misnomer, it really should have been REQUEST_PROTOCOL). 3. path unquoting was also moved from _cprequest to _cpwsgiserver (like most other WSGI servers). 4. New test for absoluteURI in the Request-Line.
* Removed last useless cherrypy.debug test.Robert Brewer2006-08-061-2/+0
|
* Fixes for #544 and #545 (serveFile issues) in CP 3. Fixes in CP 2 branch ↵Robert Brewer2006-08-031-6/+6
| | | | coming in a separate changeset.
* Replaced http.HTTPDate with its clone rfc822.formatdate.Robert Brewer2006-06-271-1/+1
|
* Heavily cleaned the namespace for Tool objects:Robert Brewer2006-06-131-0/+2
| | | | | | | 1. Privatized "name", "point", "merged_args" and "setup". 2. Renamed Tool.enable to Tool.__call__. 3. Set the docstring of each Tool instance to the docstring of the tool's callable. Combined with the above, this means calltips should pick up the calltip of the callable. 4. Tools now copy the param names of self.callable to self.attributes. This allows users to "import tools" and then get config entry auto-completion in aware editors.
* Renamed httptools to "http" to reduce confusion with new cherrypy.tools. ↵Robert Brewer2006-06-121-3/+3
| | | | Moved non-Tool-related code from cptools to {{{lib/__init__}}}. Added docstrings.
* httptools.Version was overengineered. Shame on me. Using tuples gives a 2-3% ↵Robert Brewer2006-06-121-1/+1
| | | | speed boost.
* Fix for #531 (Make an ETag tool). Also refactored If-Modified-Since validation.Robert Brewer2006-06-031-32/+5
|
* Root and config are now isolated per app:Robert Brewer2006-05-071-3/+3
| | | | | | | | | | | 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.
* Moved the following config keys out of the "server." namespace (so that ↵Robert Brewer2006-05-071-2/+2
| | | | | | | | | | | | | | "server." may mean "httpserver"): * default_content_type * log_access_file * log_config_options * log_file * log_file_not_found * log_request_headers * log_to_screen * show_tracebacks * throw_errors
* Fix for #508 (Content-Type for 304s).Robert Brewer2006-05-021-4/+3
|
* New static.serve_download function (sugar for serve_file with ↵Robert Brewer2006-05-011-0/+4
| | | | application/x-download attachment).
* More tool improvements:Robert Brewer2006-04-261-2/+2
| | | | | | | 1. Replaced request.execute_main with request.dispatch. Setting request.dispatch to None means no dispatch call. 2. Better xmlrpc tool as a result. 3. Tools now know their own names. 4. Tools now mix config into args given to wrap() and handler().
* test_core works again.Robert Brewer2006-04-251-0/+1
| | | | | | | 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.
* Dispatchers shouldn't change request.object_path before calling the page ↵Robert Brewer2006-04-221-1/+1
| | | | handler. Moved that info into a new request.found_object_path variable.
* Fixed static tool and test.Robert Brewer2006-04-221-63/+51
|
* Fixed xmlrpc tool and test. Plus:Robert Brewer2006-04-221-0/+1
| | | | | | | 1. 'path' arg is now required when calling dispatchers. 2. fixed default favicon declaration of staticfile. 3. missing import in lib/static. 4. fixed test_combinedfilters.py
* Reorganized static tools again. staticdir still needs a way to get the ↵Robert Brewer2006-04-211-0/+78
| | | | config section as an arg.
* CP 3 initial checkin. Global filters have been replaced by request.hooks. ↵Robert Brewer2006-04-211-0/+146
Lots of renaming and reorg of modules.