From d2cfa5ca41c0d8b55000cc4c9fca924c28dfc14a Mon Sep 17 00:00:00 2001 From: arjun23496 Date: Wed, 31 Aug 2016 10:23:33 +0530 Subject: Added tests for replace in request,message,header --- netlib/http/headers.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'netlib/http/headers.py') 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 -- cgit v1.2.3