From 46e31d1eccf3427c48df6adb0139e3f133a308bc Mon Sep 17 00:00:00 2001 From: Steve Pulec Date: Sat, 16 Mar 2013 11:20:07 -0400 Subject: [PATCH] pull some changes from upstream --- moto/packages/httpretty.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/moto/packages/httpretty.py b/moto/packages/httpretty.py index e0bbb404a..dc042d1e2 100644 --- a/moto/packages/httpretty.py +++ b/moto/packages/httpretty.py @@ -54,13 +54,12 @@ else: class Py3kObject(object): - pass - # def __repr__(self): - # ret = self.__str__() - # if PY3: - # return ret - # else: - # ret.encode('utf-8') + def __repr__(self): + ret = self.__str__() + if PY3: + return ret + else: + ret.encode('utf-8') from datetime import datetime from datetime import timedelta @@ -265,6 +264,7 @@ class fakesock(object): hostnames = [getattr(i.info, 'hostname', None) for i in HTTPretty._entries.keys()] self.fd.seek(0) try: + print("data", data) requestline, _ = data.split('\r\n', 1) method, path, version = parse_requestline(requestline) is_parsing_headers = True