Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved wsgi middleware, mainly a copy of a2wsgi #1049

Closed
wants to merge 4 commits into from

Conversation

euri10
Copy link
Member

@euri10 euri10 commented May 29, 2021

Should fix #371
I added types as well

@euri10 euri10 marked this pull request as draft May 29, 2021 16:09
@Kludex
Copy link
Sponsor Member

Kludex commented Jun 26, 2021

I guess we only need to remove the types on the wsgi.py file and rebase?

@abersheeran
Copy link
Member

abersheeran commented Jun 29, 2021

I think it might be more convenient to directly use a2wsgi as a dependency. As far as I know, Uvicorn and Starlette both have WSGIMiddleware, which is a duplicate. And it will cause the changes in one of the items to not be quickly reflected in the other item.

@euri10
Copy link
Member Author

euri10 commented Jun 29, 2021

that's indeed a good idea, my only concern is the types, not sure how that would work since we're not using the same base

@Kludex
Copy link
Sponsor Member

Kludex commented Jun 29, 2021

We probably should:

  1. Sync with Starlette. Should we only remove from uvicorn or removing on starlette also makes sense?
  2. If we want to remove it from uvicorn only, add a DeprecationWarning, recommending a2wsgi. Then later on we can remove it.
  3. Update documentation.

@Flauschbaellchen
Copy link

Flauschbaellchen commented Oct 19, 2021

Hi,

I run into the same problem as described in #371 as my app needs to support uploads of large files which are often 1GB or much bigger.
I would like to support here as much as I can. Do you need someone for testing purposes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WSGI middleware should stream request body, rather than loading it all at once.
4 participants