diff options
author | arjun23496 <arjun.k018@gmail.com> | 2016-08-31 16:22:20 +0530 |
---|---|---|
committer | arjun23496 <arjun.k018@gmail.com> | 2016-08-31 16:22:20 +0530 |
commit | e5766550f1576a02facb95b452e4a52271780b63 (patch) | |
tree | 4734e9246d690d09928e75fb018a10c5b6ea0846 /netlib | |
parent | dd2e0d1df3eeb934c291dd6197f722e419dd3e43 (diff) | |
download | mitmproxy-e5766550f1576a02facb95b452e4a52271780b63.tar.gz mitmproxy-e5766550f1576a02facb95b452e4a52271780b63.tar.bz2 mitmproxy-e5766550f1576a02facb95b452e4a52271780b63.zip |
Lint fix - netlib headers
Diffstat (limited to 'netlib')
-rw-r--r-- | netlib/http/headers.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/netlib/http/headers.py b/netlib/http/headers.py index 5f724f6d..6afe27c7 100644 --- a/netlib/http/headers.py +++ b/netlib/http/headers.py @@ -173,8 +173,8 @@ class Headers(multidict.MultiDict): pattern = re.compile(pattern, flags) replacements = 0 flag_count = count > 0 - fields = [] + for name, value in self.fields: line, n = pattern.subn(repl, name + b": " + value, count=count) try: @@ -185,12 +185,10 @@ class Headers(multidict.MultiDict): pass else: replacements += n - if flag_count: count -= n if count == 0: - break; - + break fields.append((name, value)) self.fields = tuple(fields) return replacements |