Skip to content
Myr

Merge pull request #983 from jszakmeister/allow-strict

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Add the ability to turn off HTTP 0.9 support.

authored by Kenneth Reitz · committed by Kenneth Reitz · parents 3b5d580, ed642cf · Browse files · 3 files+4 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+4 added−2 removed

  • other:+4 added−2 removed

3 files+4 added−2 removed

modified:requests/api.py+1 added-1 removed
40 unmodified lines
41 # if we're making it just for this call, then close it when we're done.42 adhoc_session = False43 session = kwargs.pop('session', None)44 if session is None:45 session = sessions.session()45 session = sessions.session(config=kwargs.get('config', None))46 adhoc_session = True4748 try:49 return session.request(method=method, url=url, **kwargs)
79 unmodified lines
modified:requests/defaults.py+1 added
41 unmodified lines
42defaults['keep_alive'] = True43defaults['encode_uri'] = True44defaults['trust_env'] = True45defaults['store_cookies'] = True46defaults['support_http0.9'] = True
modified:requests/sessions.py+2 added-1 removed
123 unmodified lines
124125 def init_poolmanager(self):126 self.poolmanager = PoolManager(127 num_pools=self.config.get('pool_connections'),128 maxsize=self.config.get('pool_maxsize')128 maxsize=self.config.get('pool_maxsize'),129 strict=not self.config.get('support_http0.9')130 )131132 def __repr__(self):133 return '<requests-client at 0x%x>' % (id(self))
227 unmodified lines