Skip to content
Myr

cleanups

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

authored by Kenneth Reitz · committed by Kenneth Reitz · parent 645933a · Browse files · 1 file+18 added−7 removed
This commit

State

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

Diff stats

1 file+18 added−7 removed

  • other:+18 added−7 removed

1 file+18 added−7 removed

modified:requests/models.py+18 added-7 removed
309 unmodified lines
310 # Build the final URL.311 url = self._build_url()312313 # Setup Files.314 if self.files:315 pass316317 # Setup form data.315 #316 # def urlopen(self, method, url, body=None, headers=None, retries=3,317 # redirect=True, assert_same_host=True):318 # req = _Request(url, data=self._enc_data, method=self.method)318 elif self.data:319 pass320321 # Setup cookies.322 elif self.cookies:323 pass324325326 # req = _Request(url, data=self._enc_data, method=self.method)327328 # Only send the Request if new or forced.329 if (anyway) or (not self.sent):330331 try:332333 # Create a new HTTP connection, since one wasn't passed in.334 if not connection:335 connection = urllib3.connection_from_url(url,336 timeout=self.timeout)337338 # One-off request. Delay fetching the content until needed.339 do_block = False340 else:341 # Part of a connection pool, so no streaming. Sorry!342 do_block = True343344 # Create the connection.345 r = connection.urlopen(346 method=self.method,347 url=url,348 body=self.data,
2 unmodified lines
351 assert_same_host=False,352 block=do_block353 )354341 # r.socket = pool._get_conn().sock342 # r.fo = r.data343355 # if self.cookiejar is not None:356 # self.cookiejar.extract_cookies(resp, req)357358 # except (urllib2.HTTPError, urllib2.URLError), why:
407 unmodified lines