Adjust for ODict interface change

This commit is contained in:
Aldo Cortesi 2015-04-15 10:29:57 +12:00
parent f33b483110
commit 5ff4303124
3 changed files with 4 additions and 4 deletions

View File

@ -171,7 +171,7 @@ class DumpMaster(flow.FlowMaster):
def _print_message(self, message):
if self.o.flow_detail >= 2:
print(self.indent(4, message.headers), file=self.outfile)
print(self.indent(4, message.headers.format()), file=self.outfile)
if self.o.flow_detail >= 3:
if message.content == http.CONTENT_MISSING:
print(self.indent(4, "(content missing)"), file=self.outfile)

View File

@ -268,7 +268,7 @@ class ServerPlaybackState:
# to prevent a mismatch between unicode/non-unicode.
v = [str(x) for x in v]
hdrs.append((i, v))
key.append(repr(hdrs))
key.append(hdrs)
return hashlib.sha256(repr(key)).digest()
def next_flow(self, request):

View File

@ -469,7 +469,7 @@ class HTTPRequest(HTTPMessage):
if self.content or self.content == "":
headers["Content-Length"] = [str(len(self.content))]
return str(headers)
return headers.format()
def _assemble_head(self, form=None):
return "%s\r\n%s\r\n" % (
@ -823,7 +823,7 @@ class HTTPResponse(HTTPMessage):
if self.content or self.content == "":
headers["Content-Length"] = [str(len(self.content))]
return str(headers)
return headers.format()
def _assemble_head(self, preserve_transfer_encoding=False):
return '%s\r\n%s\r\n' % (