Permalink
Browse files

Publish default accept encoding as constant.

  • Loading branch information...
1 parent 772a3e9 commit 78f520dbeaaa80e0852b1411a1f3d7beaf8f0486 @schlamar schlamar committed Mar 6, 2014
Showing with 3 additions and 1 deletion.
  1. +3 −1 urllib3/util.py
View
@@ -35,6 +35,8 @@
from .packages import six
from .exceptions import LocationParseError, SSLError, TimeoutStateError
+ACCEPT_ENCODING = 'gzip,deflate'
+
_Default = object()
# The default timeout to use for socket connections. This is the attribute used
@@ -465,7 +467,7 @@ def make_headers(keep_alive=None, accept_encoding=None, user_agent=None,
elif isinstance(accept_encoding, list):
accept_encoding = ','.join(accept_encoding)
else:
- accept_encoding = 'gzip,deflate'
+ accept_encoding = ACCEPT_ENCODING
headers['accept-encoding'] = accept_encoding
if user_agent:

0 comments on commit 78f520d

Please sign in to comment.