Robert Brewer avatar Robert Brewer committed 4811c4e

Docstrings and a test tweak.

Comments (0)

Files changed (3)

cherrypy/_cperror.py

         if self.status != 416:
             # A server sending a response with status code 416 (Requested
             # range not satisfiable) SHOULD include a Content-Range field
-            # with a byte-range- resp-spec of "*". The instance-length
+            # with a byte-range-resp-spec of "*". The instance-length
             # specifies the current length of the selected resource.
             # A response with status code 206 (Partial Content) MUST NOT
             # include a Content-Range field with a byte-range- resp-spec of "*".

cherrypy/_cprequest.py

         self.cookie = Cookie.SimpleCookie()
     
     def collapse_body(self):
-        """Iterate over self.body, replacing it with and returning the result."""
+        """Collapse self.body to a single string; replace it and return it."""
         newbody = ''.join([chunk for chunk in self.body])
         self.body = newbody
         return newbody

cherrypy/test/test_encoding.py

         
         # Ask for utf-16.
         self.getPage('/mao_zedong', [('Accept-Charset', 'utf-16')])
+        self.assertHeader('Content-Type', 'text/html;charset=utf-16')
         self.assertBody(sing16)
         
         # Ask for multiple encodings. ISO-8859-1 should fail, and utf-16
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.