projects
/
services
/
python-requests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
de1637c
)
no_proxy support
author
Mher Movsisyan
<mher.movsisyan@gmail.com>
Sun, 27 May 2012 17:21:26 +0000
(22:21 +0500)
committer
Mher Movsisyan
<mher.movsisyan@gmail.com>
Sun, 27 May 2012 17:21:26 +0000
(22:21 +0500)
requests/models.py
patch
|
blob
|
history
diff --git
a/requests/models.py
b/requests/models.py
index 79a3bc36496db95ff45ce79dddf9b269d6bad353..94e6e036b489c1db7a8ef066c6b6bdf8e4de57da 100644
(file)
--- a/
requests/models.py
+++ b/
requests/models.py
@@
-9,6
+9,7
@@
This module contains the primary objects that power Requests.
import json
import os
+import string
from datetime import datetime
from .hooks import dispatch_hook, HOOKS
@@
-521,9
+522,10
@@
class Request(object):
self.headers['Content-Type'] = content_type
_p = urlparse(url)
+ no_proxy = filter(string.strip, self.proxies.get('no', '').split(','))
proxy = self.proxies.get(_p.scheme)
- if proxy:
+ if proxy
and not any(map(_p.netloc.endswith, no_proxy))
:
conn = poolmanager.proxy_from_url(proxy)
_proxy = urlparse(proxy)
if '@' in _proxy.netloc: