Changeset 1376
- Timestamp:
- 09/26/06 00:56:53
- Files:
-
- trunk/cherrypy/lib/encoding.py (modified) (1 diff)
- trunk/cherrypy/test/test_decodingencoding.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/lib/encoding.py
r1372 r1376 79 79 body.append(chunk.encode(encoding, errors)) 80 80 cherrypy.response.body = body 81 except UnicodeError:81 except (LookupError, UnicodeError): 82 82 return False 83 83 else: trunk/cherrypy/test/test_decodingencoding.py
r1275 r1376 62 62 "iso-8859-1, *;q=0. We tried these charsets: " 63 63 "iso-8859-1.") 64 64 65 # Ask for x-mac-ce, which should be unknown. See ticket #569. 66 self.getPage('/mao_zedong', [('Accept-Charset', 67 'us-ascii, ISO-8859-1, x-mac-ce')]) 68 self.assertStatus("406 Not Acceptable") 69 self.assertInBody("Your client sent this Accept-Charset header: " 70 "us-ascii, ISO-8859-1, x-mac-ce. We tried these " 71 "charsets: x-mac-ce, us-ascii, ISO-8859-1.") 72 65 73 66 74 if __name__ == "__main__":

