Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 1636

Show
Ignore:
Timestamp:
03/09/07 12:25:20
Author:
fumanchu
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/cherrypy-3.0.x/cherrypy/_cprequest.py

    r1616 r1636  
    597597                msg = "HTTP/1.1 requires a 'Host' request header." 
    598598                raise cherrypy.HTTPError(400, msg) 
    599         host = dict.__getitem__(headers, 'Host') 
     599        host = dict.get(headers, 'Host') 
    600600        if not host: 
    601601            host = self.local.name or self.local.ip 
  • trunk/cherrypy/_cprequest.py

    r1627 r1636  
    598598                msg = "HTTP/1.1 requires a 'Host' request header." 
    599599                raise cherrypy.HTTPError(400, msg) 
    600         host = dict.__getitem__(headers, 'Host') 
     600        host = dict.get(headers, 'Host') 
    601601        if not host: 
    602602            host = self.local.name or self.local.ip 

Hosted by WebFaction

Log in as guest/cpguest to create tickets