HTTP Method is wrong
未关闭
bug
to investigate
- 主要语言
- C
- 星标
- 345
- 派生
- 94
- PR 合并指标
- 30 天内没有已合并 PR
描述
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"
```
贡献指南
这个仓库没有索引到贡献指南
调研方向
首先使用 http-parser 0.8.3 运行提供的 Python 3.6 复现代码,并检查 HttpStream.method() 如何处理请求行。确认对于所示输入,该方法被报告为 GET,同时 stream.url() 仍为 /admin;断言通过后,issue 即完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- api, backend
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100