micropython / micropython/micropython-lib
urequests still using HTTP/1.0
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 1.1k
- Avg merge
- 7d 6h
- Merged PRs (30d)
- 3
Description
The urequests module is still using HTTP/1.0 for HTTP requests:
line 39 in micropython-lib/micropython/urllib.urequest/urllib/urequest.py on the master branch:
s.write(b" HTTP/1.0\r\nHost: ")
Since a host header is included, can this be updated to use HTTP/1.1 or even HTTP/2.0?
Some sites (e.g. mongodb) are now responding with '426 Update Required' for HTTP/1.0 requests.
Thanks
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.
Research direction
Start at micropython/urllib.urequest/urllib/urequest.py line 39, where the request writes the HTTP version and Host header. Check the module's request behavior and determine whether HTTP/1.1 or HTTP/2.0 is appropriate; done means affected sites no longer reject its requests with HTTP 426.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100