Skip to content

HTTP Method is wrong #72

Description

@virusdefender

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"

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions