Skip to content

Commit 125bb00

Browse files
committed
Switch wsgi.errors to stdout
This matches other examples and the WSGI specification.
1 parent 4fc0372 commit 125bb00

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/hypercorn/app_wrappers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import annotations
22

3+
import sys
34
from functools import partial
45
from io import BytesIO
56
from typing import Callable, List, Optional, Tuple
@@ -141,7 +142,7 @@ def _build_environ(scope: HTTPScope, body: bytes) -> dict:
141142
"wsgi.version": (1, 0),
142143
"wsgi.url_scheme": scope.get("scheme", "http"),
143144
"wsgi.input": BytesIO(body),
144-
"wsgi.errors": BytesIO(),
145+
"wsgi.errors": sys.stdout,
145146
"wsgi.multithread": True,
146147
"wsgi.multiprocess": True,
147148
"wsgi.run_once": False,

0 commit comments

Comments
 (0)