Skip to content

Commit ee7d8ca

Browse files
author
pjkersha
committed
Important fix to open_url. HTTP Request object was being created inside if headers is None block - now corrected to create regardless.
git-svn-id: http://proj.badc.rl.ac.uk/svn/ndg-security/trunk/ndg_httpsclient@8191 051b1e3e-aa0c-0410-b6c2-bfbade6052be
1 parent c5708a4 commit ee7d8ca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ndg/httpsclient/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ def open_url(url, config, data=None, handlers=None):
183183
headers = config.headers
184184
if headers is None:
185185
headers = {}
186-
request = urllib2.Request(url, data, headers)
186+
187+
request = urllib2.Request(url, data, headers)
187188

188189
# Open the URL and check the response.
189190
return_code = 0

0 commit comments

Comments
 (0)