Skip to content

Commit

Permalink
Fixed problem with not honoring multiple set-cookie headers (I'm look…
Browse files Browse the repository at this point in the history
…ing at you, twisted\!)
  • Loading branch information
moxie0 committed May 15, 2011
1 parent 61235d7 commit 12b2cb5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sslstrip/ServerConnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def sendRequest(self):

def sendHeaders(self):
for header, value in self.headers.items():
logging.log(self.getLogLevel(), "Sending header: %s : %s" % (header, value))
self.sendHeader(header, value)

self.endHeaders()
Expand All @@ -64,6 +65,7 @@ def sendPostData(self):
self.transport.write(self.postData)

def connectionMade(self):
logging.log(self.getLogLevel(), "HTTP connection made.")
self.sendRequest()
self.sendHeaders()

Expand All @@ -87,6 +89,8 @@ def handleHeader(self, key, value):

if (key.lower() == 'content-length'):
self.contentLength = value
elif (key.lower() == 'set-cookie'):
self.client.responseHeaders.addRawHeader(key, value)
else:
self.client.setHeader(key, value)

Expand Down

0 comments on commit 12b2cb5

Please sign in to comment.