Commits

Jason R. Coombs committed 2a8d3af

Fixed failure on Python 2 in cherrypy.test.test_request_obj:RequestObjectTests.test_encoded_headers when the header value was unicode.

  • Participants
  • Parent commits 1648a97
  • Branches cherrypy-3.2.x

Comments (0)

Files changed (1)

cherrypy/test/webtest.py

                 conn.putrequest(method.upper(), url)
 
             for key, value in headers:
-                conn.putheader(key, ntob(value, "Latin-1"))
+                conn.putheader(key, value.encode("Latin-1"))
             conn.endheaders()
 
             if body is not None: