Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ python = ">=3.8"
aioquic = { version = ">= 0.9.0, < 1.0", optional = true }
exceptiongroup = { version = ">= 1.1.0", python = "<3.11" }
h11 = "*"
h2 = ">=3.1.0"
h2 = ">=4.3.0"
priority = "*"
pydata_sphinx_theme = { version = "*", optional = true }
sphinxcontrib_mermaid = { version = "*", optional = true }
Expand Down
14 changes: 8 additions & 6 deletions src/hypercorn/protocol/h2.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,10 @@ async def initiate(
self.connection.initiate_connection()
await self._flush()
if headers is not None:
event = h2.events.RequestReceived()
event.stream_id = 1
event.headers = headers
event = h2.events.RequestReceived(
stream_id=1,
headers=headers,
)
await self._create_stream(event)
await self.streams[event.stream_id].handle(EndBody(stream_id=event.stream_id))
self.task_group.spawn(self.send_task)
Expand Down Expand Up @@ -387,9 +388,10 @@ async def _create_server_push(
# push on a push promises request.
pass
else:
event = h2.events.RequestReceived()
event.stream_id = push_stream_id
event.headers = request_headers
event = h2.events.RequestReceived(
stream_id=push_stream_id,
headers=request_headers,
)
await self._create_stream(event)
await self.streams[event.stream_id].handle(EndBody(stream_id=event.stream_id))
self.keep_alive_requests += 1
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = docs,format,mypy,py38,py39,py310,py311,py312,package,pep8
envlist = docs,format,mypy,py38,py39,py310,py311,py312,py313,py314,package,pep8
minversion = 3.3
isolated_build = true

Expand Down