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

Wsgi content length #1175

Merged
merged 4 commits into from
Oct 18, 2023
Merged

Wsgi content length #1175

merged 4 commits into from
Oct 18, 2023

Conversation

d-maurer
Copy link
Contributor

Allows administrators to fix #1171.

The PR defines the new paste.filter_app_factory entry point content_length corresponding to a WSGI middleware component honoring a Content-Length request header.

Administrators can integrate this middleware into the WSGI pipeline when the used WSGI server does not honor the Content-Length request header. The WSGI spec recommends in note 1 of section Input and Error Streams that servers should honor the Content-Length request header. Therefore, most servers will do and the middleware should rarely be necessary; but there are exceptions, e.g. Python's wsgiref.simple_server.

@d-maurer d-maurer requested review from icemac and dataflake October 17, 2023 12:04
Copy link
Member

@icemac icemac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the approach especially the change in the zope.ini skel file documenting the usage.

src/ZPublisher/tests/test_paste.py Outdated Show resolved Hide resolved
Copy link
Member

@dataflake dataflake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just the one test module name change

src/ZPublisher/tests/test_paste.py Outdated Show resolved Hide resolved
@d-maurer
Copy link
Contributor Author

d-maurer commented Oct 18, 2023 via email

@d-maurer d-maurer merged commit 29e088e into master Oct 18, 2023
23 checks passed
@d-maurer d-maurer deleted the wsgi_content_length branch October 18, 2023 07:13
This was referenced Oct 18, 2023
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.

Zope 5.8.1 breaks using wsgiref
3 participants