Commits

Robert Brewer committed 2a49f1a

Fix for #671 (KeyError: 'Host' tut01_helloworld.py).

  • Participants
  • Parent commits ca1891b
  • Branches cherrypy-3.0.x

Comments (0)

Files changed (1)

cherrypy/_cprequest.py

             if self.protocol >= (1, 1):
                 msg = "HTTP/1.1 requires a 'Host' request header."
                 raise cherrypy.HTTPError(400, msg)
-        host = dict.__getitem__(headers, 'Host')
+        host = dict.get(headers, 'Host')
         if not host:
             host = self.local.name or self.local.ip
         self.base = "%s://%s" % (self.scheme, host)