You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An exception not be raised and the content length properly computed
Actual behavior
An exception is raised.
Debugging material
Traceback (most recent call last):
File "/***redacted***/httpx_bug.py", line 5, in <module>
response = httpx.post(
File "/***redacted***/.venv/lib/python3.9/site-packages/httpx/_api.py", line 296, in post
return request(
File "/***redacted***/.venv/lib/python3.9/site-packages/httpx/_api.py", line 93, in request
return client.request(
File "/***redacted***/.venv/lib/python3.9/site-packages/httpx/_client.py", line 733, in request
return self.send(
File "/***redacted***/.venv/lib/python3.9/site-packages/httpx/_client.py", line 767, in send
response = self._send_handling_auth(
File "/***redacted***/.venv/lib/python3.9/site-packages/httpx/_client.py", line 805, in _send_handling_auth
response = self._send_handling_redirects(
File "/***redacted***/.venv/lib/python3.9/site-packages/httpx/_client.py", line 837, in _send_handling_redirects
response = self._send_single_request(request, timeout)
File "/***redacted***/.venv/lib/python3.9/site-packages/httpx/_client.py", line 861, in _send_single_request
(status_code, headers, stream, ext) = transport.request(
File "/***redacted***/.venv/lib/python3.9/site-packages/httpcore/_sync/connection_pool.py", line 218, in request
response = connection.request(
File "/***redacted***/.venv/lib/python3.9/site-packages/httpcore/_sync/connection.py", line 106, in request
return self.connection.request(method, url, headers, stream, ext)
File "/***redacted***/.venv/lib/python3.9/site-packages/httpcore/_sync/http11.py", line 66, in request
self._send_request_body(stream, timeout)
File "/***redacted***/.venv/lib/python3.9/site-packages/httpcore/_sync/http11.py", line 112, in _send_request_body
self._send_event(event, timeout)
File "/***redacted***/.venv/lib/python3.9/site-packages/httpcore/_sync/http11.py", line 123, in _send_event
bytes_to_send = self.h11_state.send(event)
File "/***redacted***/.venv/lib/python3.9/site-packages/h11/_connection.py", line 468, in send
data_list = self.send_with_data_passthrough(event)
File "/***redacted***/.venv/lib/python3.9/site-packages/h11/_connection.py", line 501, in send_with_data_passthrough
writer(event, data_list.append)
File "/***redacted***/.venv/lib/python3.9/site-packages/h11/_writers.py", line 58, in __call__
self.send_data(event.data, write)
File "/***redacted***/.venv/lib/python3.9/site-packages/h11/_writers.py", line 78, in send_data
raise LocalProtocolError("Too much data for declared Content-Length")
h11._util.LocalProtocolError: Too much data for declared Content-Length
-->
Environment
OS: macOS
Python version: Python 3.9.1
HTTPX version: 0.16.1
Async environment: n/a
HTTP proxy: no
Custom certificates: no
Additional context
n/a
The text was updated successfully, but these errors were encountered:
Checklist
master
.Describe the bug
h11._util.LocalProtocolError: Too much data for declared Content-Length
is raised when passing string with non-ascii characters via files parameter.To reproduce
-->
Expected behavior
An exception not be raised and the content length properly computed
Actual behavior
An exception is raised.
Debugging material
-->
Environment
Python 3.9.1
0.16.1
Additional context
n/a
The text was updated successfully, but these errors were encountered: