Skip to content

Commit

Permalink
Switch wsgi.errors to stdout
Browse files Browse the repository at this point in the history
This matches other examples and the WSGI specification.
  • Loading branch information
pgjones committed Dec 28, 2023
1 parent 4fc0372 commit 125bb00
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hypercorn/app_wrappers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import annotations

import sys
from functools import partial
from io import BytesIO
from typing import Callable, List, Optional, Tuple
Expand Down Expand Up @@ -141,7 +142,7 @@ def _build_environ(scope: HTTPScope, body: bytes) -> dict:
"wsgi.version": (1, 0),
"wsgi.url_scheme": scope.get("scheme", "http"),
"wsgi.input": BytesIO(body),
"wsgi.errors": BytesIO(),
"wsgi.errors": sys.stdout,
"wsgi.multithread": True,
"wsgi.multiprocess": True,
"wsgi.run_once": False,
Expand Down

0 comments on commit 125bb00

Please sign in to comment.