From aca49b065bbe7c27d47798bdb3cb059ef213fc16 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Wed, 6 Nov 2002 15:40:05 +0000 Subject: [PATCH] Fix NameError exception ('name' undefined) --- Lib/urllib2.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/urllib2.py b/Lib/urllib2.py index f2e854a2210..f189b390298 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():