Skip to content
Myr

Merge pull request #1116 from Lukasa/master

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

Correct type of Content-Length headers.

authored by Kenneth Reitz · committed by Kenneth Reitz · parents 1a87f15, de32f17 · Browse files · 2 files+7 added−3 removed
This commit

State

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

Diff stats

2 files+7 added−3 removed

  • other:+7 added−3 removed

2 files+7 added−3 removed

modified:requests/models.py+1 added-1 removed
344 unmodified lines
345 not isinstance(data, dict)346 ])347348 try:349 length = super_len(data)349 length = str(super_len(data))350 except (TypeError, AttributeError):351 length = False352353 if is_stream:
294 unmodified lines
modified:test_requests.py+6 added-2 removed
7 unmodified lines
8import unittest910import requests11from requests.auth import HTTPDigestAuth12from requests.compat import str1314try:15 import StringIO16except ImportError:17 import io as StringIO1819HTTPBIN = os.environ.get('HTTPBIN_URL', 'http://httpbin.org/')2021def httpbin(*suffix):22 """Returns url for HTTPBIN resource."""
113 unmodified lines
136 r = requests.put(httpbin('put'))137 self.assertEqual(r.status_code, 200)138139 def test_BASICAUTH_TUPLE_HTTP_200_OK_GET(self):134135140 auth = ('user', 'pass')141 url = httpbin('basic-auth', 'user', 'pass')142143 r = requests.get(url, auth=auth)
130 unmodified lines