requests: HTTP/1.1 response bodies and max_body limit
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
Research direction
Start with the requests package and the socket mocks in test_requests.py, then run the existing request tests on the Unix port. Done means the tests cover HTTP/1.1 requests, response body length and chunked transfer, case-insensitive headers, relative redirects, and the max_body limit on Unix and ESP32.
Written by the indexing model from the issue text.
Description
Summary
Extend the requests package with essential HTTP/1.1 client behaviour:
- Send requests as HTTP/1.1 (default), keep Connection: close
- Read response bodies with Content-Length and chunked Transfer-Encoding
- Case-insensitive response headers
- Fix relative Location in redirects (closes #931)
- Default max response size 32 KiB (
max_bodykwarg to override/disable)
Out of scope (follow-up PRs)
- TLS certificate verification (#838)
- Real stream=True / incremental body read (#777)
- gzip Content-Encoding, keep-alive pool, cookies
Testing
Unix port + ESP32 with fork mip index; extend test_requests.py socket mocks.
PR will follow from branch requests-http11-essentials.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 1.1k
- Avg merge
- 7d 4h
- Merged PRs (30d)
- 4
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from micropython/micropython-lib
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
micropython/micropython-lib#1074 ·
-
needs-info
Difficulty 1/5 Under an hour Newbie friendliness 72/100
micropython/micropython-lib#943 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
micropython/micropython-lib#931 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
micropython/micropython-lib#795 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
micropython/micropython-lib#762 ·
All issues in micropython/micropython-lib
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
stephrobert/dsoxlab#238 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
sublimehq/package_control#1780 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
nwg-piotr/nwg-displays#145 ·