From: Andrew M. Kuchling Date: Wed, 6 Nov 2002 15:40:05 +0000 (+0000) Subject: Fix NameError exception ('name' undefined) X-Git-Tag: v2.3c1~3541 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=aca49b065bbe7c27d47798bdb3cb059ef213fc16;p=thirdparty%2FPython%2Fcpython.git Fix NameError exception ('name' undefined) --- diff --git a/Lib/urllib2.py b/Lib/urllib2.py index f2e854a2210f..f189b390298f 100644 --- a/Lib/urllib2.py +++ b/Lib/urllib2.py @@ -771,6 +771,7 @@ class AbstractHTTPHandler(BaseHandler): sel_host, sel_path = splithost(sel) h.putheader('Host', sel_host or host) for args in self.parent.addheaders: + name, value = args if name not in req.headers: h.putheader(*args) for k, v in req.headers.items():