aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/proxy.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-01-21 12:43:00 +1300
committerAldo Cortesi <aldo@nullcube.com>2012-01-21 12:43:00 +1300
commitd5e3722c97c2094032fe02095c3b8f7cb4df87c3 (patch)
tree457bc724192c9eae0900aa2e13a09e9d3300d266 /libmproxy/proxy.py
parent2a09cad420f2d74246deda7c48552b089714a0b6 (diff)
downloadmitmproxy-d5e3722c97c2094032fe02095c3b8f7cb4df87c3.tar.gz
mitmproxy-d5e3722c97c2094032fe02095c3b8f7cb4df87c3.tar.bz2
mitmproxy-d5e3722c97c2094032fe02095c3b8f7cb4df87c3.zip
Fix an issue caused by some editors when editing a request/response body.
Many editors make it hard save a file without a terminating newline on the last line. When editing message bodies, this can cause problems. For now, I just strip the newlines off the end of the body when we return from an editor.
Diffstat (limited to 'libmproxy/proxy.py')
-rw-r--r--libmproxy/proxy.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py
index 32057c24..9b21bd22 100644
--- a/libmproxy/proxy.py
+++ b/libmproxy/proxy.py
@@ -122,7 +122,7 @@ def parse_request_line(request):
if major != 1:
raise ProxyError(400, "Unsupported protocol")
return method, scheme, host, port, path, minor
-
+
class FileLike:
def __init__(self, o):