aboutsummaryrefslogtreecommitdiffstats
path: root/netlib/http/headers.py
diff options
context:
space:
mode:
authorarjun23496 <arjun.k018@gmail.com>2016-08-31 10:23:33 +0530
committerarjun23496 <arjun.k018@gmail.com>2016-08-31 10:23:33 +0530
commitd2cfa5ca41c0d8b55000cc4c9fca924c28dfc14a (patch)
tree0b37f026dcbe430e416152141f123489bba52a02 /netlib/http/headers.py
parentb3f05966526f46b3239bfa57fe32ed62252221b9 (diff)
downloadmitmproxy-d2cfa5ca41c0d8b55000cc4c9fca924c28dfc14a.tar.gz
mitmproxy-d2cfa5ca41c0d8b55000cc4c9fca924c28dfc14a.tar.bz2
mitmproxy-d2cfa5ca41c0d8b55000cc4c9fca924c28dfc14a.zip
Added tests for replace in request,message,header
Diffstat (limited to 'netlib/http/headers.py')
-rw-r--r--netlib/http/headers.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/netlib/http/headers.py b/netlib/http/headers.py
index 60a36515..f4cf8b7b 100644
--- a/netlib/http/headers.py
+++ b/netlib/http/headers.py
@@ -185,6 +185,8 @@ class Headers(multidict.MultiDict):
else:
count -= n
replacements += n
+ if count == 0:
+ break;
fields.append((name, value))
self.fields = tuple(fields)
return replacements