HTTP Method is wrong
- Dominant language
- C
- Stars
- 345
- Forks
- 94
- PR merge metrics
- No merged PRs in 30d
Description
Python 3.6
http-parser 0.8.3
```python
from http_parser.http import HttpStream, HTTP_REQUEST
from io import BytesIO
stream = HttpStream(BytesIO(b"GET /admin HTTP/1.1\r\n\r\n"), kind=HTTP_REQUEST)
```
This will raise AssertError
```python
assert stream.method() == "GET" # DELETE
assert stream.url() == "/admin"
```
This is correct
```python
assert stream.url() == "/admin"
assert stream.method() == "GET"
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running the provided Python 3.6 reproduction with http-parser 0.8.3 and inspect how HttpStream.method() handles the request line. Confirm that the method is reported as GET for the shown input, while stream.url() remains /admin; the issue is done when the assertions pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100