Commits

Robert Brewer committed d0dd1ee

Doc work.

Comments (0)

Files changed (2)

cherrypy/_cprequest.py

 
 
 class Request(object):
-    """An HTTP request."""
+    """An HTTP request.
+    
+    This object represents the metadata of an HTTP request message;
+    that is, it contains attributes which describe the environment
+    in which the request URL, headers, and body were sent (if you
+    want tools to interpret the headers and body, those are elsewhere,
+    mostly in Tools). This 'metadata' consists of socket data,
+    transport characteristics, and the Request-Line. This object
+    also contains data regarding the configuration in effect for
+    the given URL, and the execution plan for generating a response.
+    """
     
     prev = None
     
 
 
 class Response(object):
-    """An HTTP Response."""
+    """An HTTP Response, including status, headers, and body.
+    
+    Application developers should use Response.headers (a dict) to
+    set or modify HTTP response headers. When the response is finalized,
+    Response.headers is transformed into Response.header_list as
+    (key, value) tuples.
+    """
     
     # Class attributes for dev-time introspection.
     status = ""
         return newbody
     
     def finalize(self):
-        """Transform headers (and cookies) into cherrypy.response.header_list."""
+        """Transform headers (and cookies) into self.header_list."""
         try:
             code, reason, _ = http.valid_status(self.status)
         except ValueError, x:

cherrypy/lib/__init__.py

         if o.name == 'False':
             return False
         
-        # See if the Name is a package or module
+        # See if the Name is a package or module. If it is, import it.
         try:
             return modules(o.name)
         except ImportError:
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.