-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Ability to disable 'Transfer-Encoding: chunked' #9988
Comments
This issue is currently awaiting triage. If Ingress contributors determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Do you want to submit a PR ? |
I think I can try! |
This is stale, but we won't close it automatically, just bare in mind the maintainers may be busy with other tasks and will reach your issue ASAP. If you have any question or request to prioritize this, please reach |
@iSerganov we now have Nginx v1.25 which has chunking on by default. I am not sure if you are still interested in this but its been open without activity for a long time. So I will close this for now and you can reopen it if you are going to work on a PR as per notes in this issue history. thanks you /close |
@longwuyuan: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Background
There are numerous legacy client devices for audio playback that doesn't support chunked Transfer Encoding.
At the same time they use HTTP/1.1 clients to request audio streams. Not supporting chunked Transfer-Encoding by HTTP/1.1 clients is a spec violation as RFC-7230 clearly says that HTTP/1.1 clients must do that. My guess is that the reason for such spec neglect is that not so long ago all Icecast/SHOUTcast streaming servers returned only HTTP/1.0 responses and never supported chunking.
Though all modern devices support chunking, this still appears to be quite a common case in streaming universe as thousands of legacy clients are still eager to access audio streams all over the world.
Fix
Actual fix to this issue is very simple: you detect a request from legacy device analyzing
User-Agent
HTTP header and add the following line to your code (Golang):But...
... this doesn't work if a streaming server is behind Nginx ingress controller which always returns
[http @ 0x600003d901e0] header='Transfer-Encoding: chunked'
to all HTTP client requests untilContent-Length
header is specified. This behavior is 100% correct and spec compliant however breaks the fix from the previous paragraph.Request
Is it possible to add control over
Transfer-Encoding
response header through e.g. new annotation:nginx.ingress.kubernetes.io/disable-chunked-transfer-encoding: true
?The text was updated successfully, but these errors were encountered: