HTTP Method is wrong
- Lingua principale
- C
- Stelle
- 345
- Fork
- 94
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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"
```
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- api, backend
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 42/100