Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[HttpFoundation] Do not set a Transfer-Encoding header of chunked for streaming responses#3017

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 2 commits intosymfony:masterfromigorw:streaming
Jan 2, 2012

Conversation

@igorw
Copy link
Contributor

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes

This is an adjustment to the streaming introduced in#2935.

Apache expects the response to already be in chunked format when the Transfer-Encoding header is set to chunked, which causes it to not deliver the streamed body.

If no Content-Length is set on the response (regardless of Transfer-Encoding), web servers will automatically switch to chunked Transfer-Encoding, and handle the chunking for you.

I have tested this with Apache 2.2.2 and nginx 1.0.5. Testing with other webservers is appreciated.

Apache expects the response to already be in chunked format in that case,which causes it to not deliver the streamed body.If no Content-Length is set on the response, web servers will automaticallyswitch to chunked Transfer-Encoding, and handle the chunking for you.Nginx does not share the issue that apache has, but will add the Content-Length header too.
Copy link
Contributor

Choose a reason for hiding this comment

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

How about adding a negative test to avoid regressions and document why it's necessary, i.e. assertNotEquals(...)?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Done.

fabpot added a commit that referenced this pull requestJan 2, 2012
Commits-------7ae9348 [streaming] Document and test that Transfer-Encoding is absent83c23ca [streaming] Do not set a Transfer-Encoding header of chunkedDiscussion----------[HttpFoundation] Do not set a Transfer-Encoding header of chunked for streaming responsesBug fix: yesFeature addition: noBackwards compatibility break: noSymfony2 tests pass: yesThis is an adjustment to the streaming introduced in#2935.Apache expects the response to already be in chunked format when the Transfer-Encoding header is set to chunked, which causes it to not deliver the streamed body.If no Content-Length is set on the response (regardless of Transfer-Encoding), web servers will automatically switch to chunked Transfer-Encoding, and handle the chunking for you.I have tested this with Apache 2.2.2 and nginx 1.0.5. Testing with other webservers is appreciated.
@fabpotfabpot merged commit7ae9348 intosymfony:masterJan 2, 2012
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@igorw@schmittjoh@fabpot

[8]ページ先頭

©2009-2025 Movatter.jp