Skip to content

fix(django-cf): replace wsgi adapter in django-cf to wsgi in runtime-sdk - #195

Merged
ryanking13 merged 4 commits into
mainfrom
gyeongjae/django-wsgi
Aug 14, 2026
Merged

fix(django-cf): replace wsgi adapter in django-cf to wsgi in runtime-sdk#195
ryanking13 merged 4 commits into
mainfrom
gyeongjae/django-wsgi

Conversation

@ryanking13

Copy link
Copy Markdown
Contributor

Replaces the handle_wsgi function inside django-cf to use the wsgi.py that we provide.

@ask-bonk

ask-bonk Bot commented Aug 12, 2026

Copy link
Copy Markdown

I've thoroughly reviewed the PR. The changes look solid:

  1. The handle_wsgi function is correctly refactored to delegate to workers.wsgi.fetch, which handles streaming, binary data, cookies, and header translation properly.
  2. self.env is now passed through so that workers.env is available in the WSGI environ.
  3. get_app is correctly changed from async to sync in docs/README (it was never truly async).
  4. Tests are well-written, covering binary responses, streaming, multiple cookies, URL-encoded path segments, different HTTP methods, and env binding access.
  5. The dependency on workers-runtime-sdk>=1.6.0 is correctly added.

The only thing that caught my eye — DjangoCFDurableObject.fetch calls handle_wsgi (which is async) without await — is a pre-existing pattern unchanged by this PR, not something introduced here.

LGTM

github run

@ryanking13
ryanking13 force-pushed the gyeongjae/django-wsgi branch from 3e47a1c to 19cba87 Compare August 14, 2026 02:35
@ryanking13
ryanking13 merged commit 93a4d51 into main Aug 14, 2026
20 checks passed
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.

2 participants