Fix Request.request_protocol; it was looking for is_secure in a place the refactoring had made go away

This commit is contained in:
donovan
2008-04-01 14:42:21 -07:00
parent 2d3eb63488
commit dd4c750604

View File

@@ -389,7 +389,7 @@ class Request(object):
return self.protocol.request_version
def request_protocol(self):
if self.protocol.socket.is_secure:
if self.protocol.is_secure:
return "https"
return "http"
@@ -413,6 +413,7 @@ class Timeout(RuntimeError):
class HttpProtocol(BaseHTTPServer.BaseHTTPRequestHandler):
def __init__(self, request, client_address, server):
self.rfile = self.wfile = request.makefile()
self.is_secure = request.is_secure
request.close() # close this now so that when rfile and wfile are closed, the socket gets closed
self.client_address = client_address
self.server = server