Skip to content

Commit 092ef88

Browse files
committed
Fixed http app proxy bug
1 parent a803586 commit 092ef88

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

http/1.4.0/src/app.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,11 @@ def GET(self, url, headers="", username="", password="", verify=True, http_proxy
174174
parsed_headers = self.splitheaders(headers)
175175
parsed_headers["User-Agent"] = "Shuffle Automation"
176176
verify = self.checkverify(verify)
177+
177178
proxies = None
179+
if http_proxy or https_proxy:
180+
proxies = {}
181+
178182
if http_proxy:
179183
proxies["http"] = http_proxy
180184
if https_proxy:
@@ -213,6 +217,8 @@ def POST(self, url, headers="", body="", username="", password="", verify=True,
213217
verify = self.checkverify(verify)
214218
body = self.checkbody(body)
215219
proxies = None
220+
if http_proxy or https_proxy:
221+
proxies = {}
216222
if http_proxy:
217223
proxies["http"] = http_proxy
218224
if https_proxy:
@@ -251,6 +257,8 @@ def PUT(self, url, headers="", body="", username="", password="", verify=True, h
251257
verify = self.checkverify(verify)
252258
body = self.checkbody(body)
253259
proxies = None
260+
if http_proxy or https_proxy:
261+
proxies = {}
254262
if http_proxy:
255263
proxies["http"] = http_proxy
256264
if https_proxy:
@@ -290,6 +298,8 @@ def PATCH(self, url, headers="", body="", username="", password="", verify=True,
290298
verify = self.checkverify(verify)
291299
body = self.checkbody(body)
292300
proxies = None
301+
if http_proxy or https_proxy:
302+
proxies = {}
293303
if http_proxy:
294304
proxies["http"] = http_proxy
295305
if https_proxy:
@@ -328,6 +338,8 @@ def DELETE(self, url, headers="", body="", username="", password="", verify=True
328338
verify = self.checkverify(verify)
329339
body = self.checkbody(body)
330340
proxies = None
341+
if http_proxy or https_proxy:
342+
proxies = {}
331343
if http_proxy:
332344
proxies["http"] = http_proxy
333345
if https_proxy:
@@ -366,6 +378,8 @@ def HEAD(self, url, headers="", body="", username="", password="", verify=True,
366378
verify = self.checkverify(verify)
367379
body = self.checkbody(body)
368380
proxies = None
381+
if http_proxy or https_proxy:
382+
proxies = {}
369383
if http_proxy:
370384
proxies["http"] = http_proxy
371385
if https_proxy:
@@ -404,6 +418,8 @@ def OPTIONS(self, url, headers="", body="", username="", password="", verify=Tru
404418
verify = self.checkverify(verify)
405419
body = self.checkbody(body)
406420
proxies = None
421+
if http_proxy or https_proxy:
422+
proxies = {}
407423
if http_proxy:
408424
proxies["http"] = http_proxy
409425
if https_proxy:

0 commit comments

Comments
 (0)