benoitc / benoitc/http-parser

HTTP Method is wrong

Open
#72 3 comments 0 reactions 0 assignees View on GitHub
bug to investigate
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

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.