Skip to content

fix(runtime-sdk): do not include HTTP body for null body status codes - #162

Open
ryanking13 wants to merge 1 commit into
mainfrom
gyeongjae/wsgi-null-body
Open

fix(runtime-sdk): do not include HTTP body for null body status codes#162
ryanking13 wants to merge 1 commit into
mainfrom
gyeongjae/wsgi-null-body

Conversation

@ryanking13

Copy link
Copy Markdown
Contributor

I already applied the same fix in asgi.py in #148, this applies the same fix to wsgi.py

@ask-bonk

ask-bonk Bot commented Jul 30, 2026

Copy link
Copy Markdown

UnknownError: "Overloaded"

github run

@ask-bonk

ask-bonk Bot commented Jul 30, 2026

Copy link
Copy Markdown

@ryanking13 Bonk workflow failed. Check the logs for details.

View workflow run · To retry, trigger Bonk again.

@ask-bonk

ask-bonk Bot commented Jul 30, 2026

Copy link
Copy Markdown

The change is clean and consistent with the existing ASGI implementation. The logic is correct:

  1. NULL_BODY_STATUSES is the same set used in asgi.py ({101, 103, 204, 205, 304}), matching the Fetch spec's null body statuses.
  2. The early return with Response.new(None, ...) prevents attaching a ReadableStream body to responses that must not have one.
  3. on_close() is correctly called before the early return, ensuring the WSGI iterable and wsgi.input are properly closed (matching the cleanup contract).
  4. The code variable extraction is a sensible refactor to avoid parsing the status code twice.

No logic bugs, security issues, backward compatibility concerns, or other actionable problems.

LGTM

github run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant