Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP Method is wrong #72

Open
virusdefender opened this issue Aug 29, 2017 · 3 comments
Open

HTTP Method is wrong #72

virusdefender opened this issue Aug 29, 2017 · 3 comments

Comments

@virusdefender
Copy link

virusdefender commented Aug 29, 2017

Python 3.6
http-parser 0.8.3

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

assert stream.method() == "GET" # DELETE
assert stream.url() == "/admin"

This is correct

assert stream.url() == "/admin"
assert stream.method() == "GET"
@petri
Copy link

petri commented Dec 2, 2018

I was able to confirm this issue on Python3.7 on MacOS.

@benoitc
Copy link
Owner

benoitc commented Apr 6, 2020

related to #70

@benoitc benoitc added this to the 0.9.1 milestone Apr 17, 2020
@Jc2k
Copy link

Jc2k commented Sep 27, 2020

This is still happening, but only for the C parser. If i switch to the python fallback it works.

from http_parser.pyparser import HttpParser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants