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

Changeset 1956

Show
Ignore:
Timestamp:
04/27/08 20:05:55
Author:
fumanchu
Message:

Comments.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/wsgiserver/__init__.py

    r1950 r1956  
    407407        # Persistent connection support 
    408408        if self.response_protocol == "HTTP/1.1": 
     409            # Both server and client are HTTP/1.1 
    409410            if environ.get("HTTP_CONNECTION", "") == "close": 
    410411                self.close_connection = True 
    411412        else: 
    412             # HTTP/1.0 
     413            # Either the server or client (or both) are HTTP/1.0 
    413414            if environ.get("HTTP_CONNECTION", "") != "Keep-Alive": 
    414415                self.close_connection = True 
     
    641642        if "connection" not in hkeys: 
    642643            if self.response_protocol == 'HTTP/1.1': 
     644                # Both server and client are HTTP/1.1 or better 
    643645                if self.close_connection: 
    644646                    self.outheaders.append(("Connection", "close")) 
    645647            else: 
     648                # Server and/or client are HTTP/1.0 
    646649                if not self.close_connection: 
    647650                    self.outheaders.append(("Connection", "Keep-Alive")) 

Hosted by WebFaction

Log in as guest/cpguest to create tickets