We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Switch http_parser to llhttp
Nodejs decide to move from their hard-coded C parser to this one.

https://github.com/nodejs/http-parser/pull/285#issuecomment-456025694

*Upd:* 
proposed parser is https://llhttp.org


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `setup.py`
Content:
```
1 import os
2 import pathlib
3 import re
4 import sys
5 
6 from setuptools import Extension, setup
7 
8 if sys.version_info < (3, 7):
9     raise RuntimeError("aiohttp 4.x requires Python 3.7+")
10 
11 
12 NO_EXTENSIONS = bool(os.environ.get("AIOHTTP_NO_EXTENSIONS"))  # type: bool
13 HERE = pathlib.Path(__file__).parent
14 IS_GIT_REPO = (HERE / ".git").exists()
15 
16 
17 if sys.implementation.name != "cpython":
18     NO_EXTENSIONS = True
19 
20 
21 if IS_GIT_REPO and not (HERE / "vendor/http-parser/README.md").exists():
22     print("Install submodules when building from git clone", file=sys.stderr)
23     print("Hint:", file=sys.stderr)
24     print("  git submodule update --init", file=sys.stderr)
25     sys.exit(2)
26 
27 
28 # NOTE: makefile cythonizes all Cython modules
29 
30 extensions = [
31     Extension("aiohttp._websocket", ["aiohttp/_websocket.c"]),
32     Extension(
33         "aiohttp._http_parser",
34         [
35             "aiohttp/_http_parser.c",
36             "vendor/http-parser/http_parser.c",
37             "aiohttp/_find_header.c",
38         ],
39         define_macros=[("HTTP_PARSER_STRICT", 0)],
40     ),
41     Extension("aiohttp._helpers", ["aiohttp/_helpers.c"]),
42     Extension("aiohttp._http_writer", ["aiohttp/_http_writer.c"]),
43 ]
44 
45 
46 txt = (HERE / "aiohttp" / "__init__.py").read_text("utf-8")
47 try:
48     version = re.findall(r'^__version__ = "([^"]+)"\r?$', txt, re.M)[0]
49 except IndexError:
50     raise RuntimeError("Unable to determine version.")
51 
52 install_requires = [
53     "charset-normalizer>=2.0,<3.0",
54     "multidict>=4.5,<7.0",
55     "async_timeout>=4.0a2,<5.0",
56     'asynctest==0.13.0; python_version<"3.8"',
57     "yarl>=1.0,<2.0",
58     "typing_extensions>=3.7.4",
59     "frozenlist>=1.1.1",
60     "aiosignal>=1.1.2",
61 ]
62 
63 
64 def read(f):
65     return (HERE / f).read_text("utf-8").strip()
66 
67 
68 args = dict(
69     name="aiohttp",
70     version=version,
71     description="Async http client/server framework (asyncio)",
72     long_description="\n\n".join((read("README.rst"), read("CHANGES.rst"))),
73     long_description_content_type="text/x-rst",
74     classifiers=[
75         "License :: OSI Approved :: Apache Software License",
76         "Intended Audience :: Developers",
77         "Programming Language :: Python",
78         "Programming Language :: Python :: 3",
79         "Programming Language :: Python :: 3.7",
80         "Programming Language :: Python :: 3.8",
81         "Programming Language :: Python :: 3.9",
82         "Programming Language :: Python :: 3.10",
83         "Development Status :: 5 - Production/Stable",
84         "Operating System :: POSIX",
85         "Operating System :: MacOS :: MacOS X",
86         "Operating System :: Microsoft :: Windows",
87         "Topic :: Internet :: WWW/HTTP",
88         "Framework :: AsyncIO",
89     ],
90     author="Nikolay Kim",
91     author_email="fafhrd91@gmail.com",
92     maintainer=", ".join(
93         (
94             "Nikolay Kim <fafhrd91@gmail.com>",
95             "Andrew Svetlov <andrew.svetlov@gmail.com>",
96         )
97     ),
98     maintainer_email="aio-libs@googlegroups.com",
99     url="https://github.com/aio-libs/aiohttp",
100     project_urls={
101         "Chat: Gitter": "https://gitter.im/aio-libs/Lobby",
102         "CI: GitHub Actions": "https://github.com/aio-libs/aiohttp/actions?query=workflow%3ACI",  # noqa
103         "Coverage: codecov": "https://codecov.io/github/aio-libs/aiohttp",
104         "Docs: Changelog": "https://docs.aiohttp.org/en/stable/changes.html",
105         "Docs: RTD": "https://docs.aiohttp.org",
106         "GitHub: issues": "https://github.com/aio-libs/aiohttp/issues",
107         "GitHub: repo": "https://github.com/aio-libs/aiohttp",
108     },
109     license="Apache 2",
110     packages=["aiohttp"],
111     python_requires=">=3.7",
112     install_requires=install_requires,
113     extras_require={
114         "speedups": [
115             "aiodns>=1.1",
116             "Brotli",
117             "cchardet",
118         ],
119     },
120     include_package_data=True,
121 )
122 
123 if not NO_EXTENSIONS:
124     print("*********************")
125     print("* Accelerated build *")
126     print("*********************")
127     setup(ext_modules=extensions, **args)
128 else:
129     print("*********************")
130     print("* Pure Python build *")
131     print("*********************")
132     setup(**args)
133
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -18,7 +18,7 @@
     NO_EXTENSIONS = True
 
 
-if IS_GIT_REPO and not (HERE / "vendor/http-parser/README.md").exists():
+if IS_GIT_REPO and not (HERE / "vendor/llhttp/README.md").exists():
     print("Install submodules when building from git clone", file=sys.stderr)
     print("Hint:", file=sys.stderr)
     print("  git submodule update --init", file=sys.stderr)
@@ -33,10 +33,13 @@
         "aiohttp._http_parser",
         [
             "aiohttp/_http_parser.c",
-            "vendor/http-parser/http_parser.c",
             "aiohttp/_find_header.c",
+            "vendor/llhttp/build/c/llhttp.c",
+            "vendor/llhttp/src/native/api.c",
+            "vendor/llhttp/src/native/http.c",
         ],
-        define_macros=[("HTTP_PARSER_STRICT", 0)],
+        define_macros=[("LLHTTP_STRICT_MODE", 0)],
+        include_dirs=["vendor/llhttp/build"],
     ),
     Extension("aiohttp._helpers", ["aiohttp/_helpers.c"]),
     Extension("aiohttp._http_writer", ["aiohttp/_http_writer.c"]),

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -18,7 +18,7 @@\n     NO_EXTENSIONS = True\n \n \n-if IS_GIT_REPO and not (HERE / \"vendor/http-parser/README.md\").exists():\n+if IS_GIT_REPO and not (HERE / \"vendor/llhttp/README.md\").exists():\n     print(\"Install submodules when building from git clone\", file=sys.stderr)\n     print(\"Hint:\", file=sys.stderr)\n     print(\"  git submodule update --init\", file=sys.stderr)\n@@ -33,10 +33,13 @@\n         \"aiohttp._http_parser\",\n         [\n             \"aiohttp/_http_parser.c\",\n-            \"vendor/http-parser/http_parser.c\",\n             \"aiohttp/_find_header.c\",\n+            \"vendor/llhttp/build/c/llhttp.c\",\n+            \"vendor/llhttp/src/native/api.c\",\n+            \"vendor/llhttp/src/native/http.c\",\n         ],\n-        define_macros=[(\"HTTP_PARSER_STRICT\", 0)],\n+        define_macros=[(\"LLHTTP_STRICT_MODE\", 0)],\n+        include_dirs=[\"vendor/llhttp/build\"],\n     ),\n     Extension(\"aiohttp._helpers\", [\"aiohttp/_helpers.c\"]),\n     Extension(\"aiohttp._http_writer\", [\"aiohttp/_http_writer.c\"]),\n", "issue": "Switch http_parser to llhttp\nNodejs decide to move from their hard-coded C parser to this one.\r\n\r\nhttps://github.com/nodejs/http-parser/pull/285#issuecomment-456025694\r\n\r\n*Upd:* \r\nproposed parser is https://llhttp.org\r\n\n", "before_files": [{"content": "import os\nimport pathlib\nimport re\nimport sys\n\nfrom setuptools import Extension, setup\n\nif sys.version_info < (3, 7):\n    raise RuntimeError(\"aiohttp 4.x requires Python 3.7+\")\n\n\nNO_EXTENSIONS = bool(os.environ.get(\"AIOHTTP_NO_EXTENSIONS\"))  # type: bool\nHERE = pathlib.Path(__file__).parent\nIS_GIT_REPO = (HERE / \".git\").exists()\n\n\nif sys.implementation.name != \"cpython\":\n    NO_EXTENSIONS = True\n\n\nif IS_GIT_REPO and not (HERE / \"vendor/http-parser/README.md\").exists():\n    print(\"Install submodules when building from git clone\", file=sys.stderr)\n    print(\"Hint:\", file=sys.stderr)\n    print(\"  git submodule update --init\", file=sys.stderr)\n    sys.exit(2)\n\n\n# NOTE: makefile cythonizes all Cython modules\n\nextensions = [\n    Extension(\"aiohttp._websocket\", [\"aiohttp/_websocket.c\"]),\n    Extension(\n        \"aiohttp._http_parser\",\n        [\n            \"aiohttp/_http_parser.c\",\n            \"vendor/http-parser/http_parser.c\",\n            \"aiohttp/_find_header.c\",\n        ],\n        define_macros=[(\"HTTP_PARSER_STRICT\", 0)],\n    ),\n    Extension(\"aiohttp._helpers\", [\"aiohttp/_helpers.c\"]),\n    Extension(\"aiohttp._http_writer\", [\"aiohttp/_http_writer.c\"]),\n]\n\n\ntxt = (HERE / \"aiohttp\" / \"__init__.py\").read_text(\"utf-8\")\ntry:\n    version = re.findall(r'^__version__ = \"([^\"]+)\"\\r?$', txt, re.M)[0]\nexcept IndexError:\n    raise RuntimeError(\"Unable to determine version.\")\n\ninstall_requires = [\n    \"charset-normalizer>=2.0,<3.0\",\n    \"multidict>=4.5,<7.0\",\n    \"async_timeout>=4.0a2,<5.0\",\n    'asynctest==0.13.0; python_version<\"3.8\"',\n    \"yarl>=1.0,<2.0\",\n    \"typing_extensions>=3.7.4\",\n    \"frozenlist>=1.1.1\",\n    \"aiosignal>=1.1.2\",\n]\n\n\ndef read(f):\n    return (HERE / f).read_text(\"utf-8\").strip()\n\n\nargs = dict(\n    name=\"aiohttp\",\n    version=version,\n    description=\"Async http client/server framework (asyncio)\",\n    long_description=\"\\n\\n\".join((read(\"README.rst\"), read(\"CHANGES.rst\"))),\n    long_description_content_type=\"text/x-rst\",\n    classifiers=[\n        \"License :: OSI Approved :: Apache Software License\",\n        \"Intended Audience :: Developers\",\n        \"Programming Language :: Python\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.7\",\n        \"Programming Language :: Python :: 3.8\",\n        \"Programming Language :: Python :: 3.9\",\n        \"Programming Language :: Python :: 3.10\",\n        \"Development Status :: 5 - Production/Stable\",\n        \"Operating System :: POSIX\",\n        \"Operating System :: MacOS :: MacOS X\",\n        \"Operating System :: Microsoft :: Windows\",\n        \"Topic :: Internet :: WWW/HTTP\",\n        \"Framework :: AsyncIO\",\n    ],\n    author=\"Nikolay Kim\",\n    author_email=\"fafhrd91@gmail.com\",\n    maintainer=\", \".join(\n        (\n            \"Nikolay Kim <fafhrd91@gmail.com>\",\n            \"Andrew Svetlov <andrew.svetlov@gmail.com>\",\n        )\n    ),\n    maintainer_email=\"aio-libs@googlegroups.com\",\n    url=\"https://github.com/aio-libs/aiohttp\",\n    project_urls={\n        \"Chat: Gitter\": \"https://gitter.im/aio-libs/Lobby\",\n        \"CI: GitHub Actions\": \"https://github.com/aio-libs/aiohttp/actions?query=workflow%3ACI\",  # noqa\n        \"Coverage: codecov\": \"https://codecov.io/github/aio-libs/aiohttp\",\n        \"Docs: Changelog\": \"https://docs.aiohttp.org/en/stable/changes.html\",\n        \"Docs: RTD\": \"https://docs.aiohttp.org\",\n        \"GitHub: issues\": \"https://github.com/aio-libs/aiohttp/issues\",\n        \"GitHub: repo\": \"https://github.com/aio-libs/aiohttp\",\n    },\n    license=\"Apache 2\",\n    packages=[\"aiohttp\"],\n    python_requires=\">=3.7\",\n    install_requires=install_requires,\n    extras_require={\n        \"speedups\": [\n            \"aiodns>=1.1\",\n            \"Brotli\",\n            \"cchardet\",\n        ],\n    },\n    include_package_data=True,\n)\n\nif not NO_EXTENSIONS:\n    print(\"*********************\")\n    print(\"* Accelerated build *\")\n    print(\"*********************\")\n    setup(ext_modules=extensions, **args)\nelse:\n    print(\"*********************\")\n    print(\"* Pure Python build *\")\n    print(\"*********************\")\n    setup(**args)\n", "path": "setup.py"}], "after_files": [{"content": "import os\nimport pathlib\nimport re\nimport sys\n\nfrom setuptools import Extension, setup\n\nif sys.version_info < (3, 7):\n    raise RuntimeError(\"aiohttp 4.x requires Python 3.7+\")\n\n\nNO_EXTENSIONS = bool(os.environ.get(\"AIOHTTP_NO_EXTENSIONS\"))  # type: bool\nHERE = pathlib.Path(__file__).parent\nIS_GIT_REPO = (HERE / \".git\").exists()\n\n\nif sys.implementation.name != \"cpython\":\n    NO_EXTENSIONS = True\n\n\nif IS_GIT_REPO and not (HERE / \"vendor/llhttp/README.md\").exists():\n    print(\"Install submodules when building from git clone\", file=sys.stderr)\n    print(\"Hint:\", file=sys.stderr)\n    print(\"  git submodule update --init\", file=sys.stderr)\n    sys.exit(2)\n\n\n# NOTE: makefile cythonizes all Cython modules\n\nextensions = [\n    Extension(\"aiohttp._websocket\", [\"aiohttp/_websocket.c\"]),\n    Extension(\n        \"aiohttp._http_parser\",\n        [\n            \"aiohttp/_http_parser.c\",\n            \"aiohttp/_find_header.c\",\n            \"vendor/llhttp/build/c/llhttp.c\",\n            \"vendor/llhttp/src/native/api.c\",\n            \"vendor/llhttp/src/native/http.c\",\n        ],\n        define_macros=[(\"LLHTTP_STRICT_MODE\", 0)],\n        include_dirs=[\"vendor/llhttp/build\"],\n    ),\n    Extension(\"aiohttp._helpers\", [\"aiohttp/_helpers.c\"]),\n    Extension(\"aiohttp._http_writer\", [\"aiohttp/_http_writer.c\"]),\n]\n\n\ntxt = (HERE / \"aiohttp\" / \"__init__.py\").read_text(\"utf-8\")\ntry:\n    version = re.findall(r'^__version__ = \"([^\"]+)\"\\r?$', txt, re.M)[0]\nexcept IndexError:\n    raise RuntimeError(\"Unable to determine version.\")\n\ninstall_requires = [\n    \"charset-normalizer>=2.0,<3.0\",\n    \"multidict>=4.5,<7.0\",\n    \"async_timeout>=4.0a2,<5.0\",\n    'asynctest==0.13.0; python_version<\"3.8\"',\n    \"yarl>=1.0,<2.0\",\n    \"typing_extensions>=3.7.4\",\n    \"frozenlist>=1.1.1\",\n    \"aiosignal>=1.1.2\",\n]\n\n\ndef read(f):\n    return (HERE / f).read_text(\"utf-8\").strip()\n\n\nargs = dict(\n    name=\"aiohttp\",\n    version=version,\n    description=\"Async http client/server framework (asyncio)\",\n    long_description=\"\\n\\n\".join((read(\"README.rst\"), read(\"CHANGES.rst\"))),\n    long_description_content_type=\"text/x-rst\",\n    classifiers=[\n        \"License :: OSI Approved :: Apache Software License\",\n        \"Intended Audience :: Developers\",\n        \"Programming Language :: Python\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.7\",\n        \"Programming Language :: Python :: 3.8\",\n        \"Programming Language :: Python :: 3.9\",\n        \"Programming Language :: Python :: 3.10\",\n        \"Development Status :: 5 - Production/Stable\",\n        \"Operating System :: POSIX\",\n        \"Operating System :: MacOS :: MacOS X\",\n        \"Operating System :: Microsoft :: Windows\",\n        \"Topic :: Internet :: WWW/HTTP\",\n        \"Framework :: AsyncIO\",\n    ],\n    author=\"Nikolay Kim\",\n    author_email=\"fafhrd91@gmail.com\",\n    maintainer=\", \".join(\n        (\n            \"Nikolay Kim <fafhrd91@gmail.com>\",\n            \"Andrew Svetlov <andrew.svetlov@gmail.com>\",\n        )\n    ),\n    maintainer_email=\"aio-libs@googlegroups.com\",\n    url=\"https://github.com/aio-libs/aiohttp\",\n    project_urls={\n        \"Chat: Gitter\": \"https://gitter.im/aio-libs/Lobby\",\n        \"CI: GitHub Actions\": \"https://github.com/aio-libs/aiohttp/actions?query=workflow%3ACI\",  # noqa\n        \"Coverage: codecov\": \"https://codecov.io/github/aio-libs/aiohttp\",\n        \"Docs: Changelog\": \"https://docs.aiohttp.org/en/stable/changes.html\",\n        \"Docs: RTD\": \"https://docs.aiohttp.org\",\n        \"GitHub: issues\": \"https://github.com/aio-libs/aiohttp/issues\",\n        \"GitHub: repo\": \"https://github.com/aio-libs/aiohttp\",\n    },\n    license=\"Apache 2\",\n    packages=[\"aiohttp\"],\n    python_requires=\">=3.7\",\n    install_requires=install_requires,\n    extras_require={\n        \"speedups\": [\n            \"aiodns>=1.1\",\n            \"Brotli\",\n            \"cchardet\",\n        ],\n    },\n    include_package_data=True,\n)\n\nif not NO_EXTENSIONS:\n    print(\"*********************\")\n    print(\"* Accelerated build *\")\n    print(\"*********************\")\n    setup(ext_modules=extensions, **args)\nelse:\n    print(\"*********************\")\n    print(\"* Pure Python build *\")\n    print(\"*********************\")\n    setup(**args)\n", "path": "setup.py"}]}