Skip to content

Commit

Permalink
Fix bump llhttp to v8.1.1 (#7367) (#7377)
Browse files Browse the repository at this point in the history
(cherry picked from commit 41e2c4c)
  • Loading branch information
Dreamsorcerer authored Jul 18, 2023
1 parent f07e9b4 commit 9337fb3
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "vendor/llhttp"]
path = vendor/llhttp
url = https://github.com/nodejs/llhttp.git
branch = v8.1.1
branch = v8.x
2 changes: 2 additions & 0 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ Install pre-commit hooks:

Congratulations, you are ready to run the test suite!

.. include:: ../vendor/README.rst


Run autoformatter
-----------------
Expand Down
1 change: 1 addition & 0 deletions tests/test_http_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,7 @@ def test_http_response_parser_bad(response) -> None:
response.feed_data(b"HTT/1\r\n\r\n")


@pytest.mark.skipif(not NO_EXTENSIONS, reason="Behaviour has changed in C parser")
def test_http_response_parser_code_under_100(response) -> None:
msg = response.feed_data(b"HTTP/1.1 99 test\r\n\r\n")[0][0][0]
assert msg.code == 99
Expand Down
23 changes: 23 additions & 0 deletions vendor/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
LLHTTP
------

When building aiohttp from source, there is a pure Python parser used by default.
For better performance, you may want to build the higher performance C parser.

To build this ``llhttp`` parser, first get/update the submodules (to update to a
newer release, add ``--remote`` and check the branch in ``.gitmodules``)::

git submodule update --init --recursive

Then build ``llhttp``::

cd vendor/llhttp/
npm install
make

Then build our parser::

cd -
make cythonize

Then you can build or install it with ``python -m build`` or ``pip install -e .``
2 changes: 1 addition & 1 deletion vendor/llhttp

0 comments on commit 9337fb3

Please sign in to comment.