You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
buffer: Synthesize content-length header in case of request buffering #7844
Description:
When envoy processes request with enabled buffering it reads the whole request into memory before sending headers to an upstream.
Is is possible to make Envoy populate content-length header in this case? It would help with some http/1.0 backends (which unfortunately still exist in the wild).
Another option would be to add http/1.0-compliant behavior as cluster option (based on the precedent of existing accept_http10 option).
Without either of this options Envoy tries to send chunked-encoded data, which is observed as empty body by http/1.0 server.
I've made a quick prototype and this functionality (populating content-length) can be done as part of envoy.buffer plugin. It looks like no changes are required in envoy core itself.
Should I send a pull request? Should it be made configurable or is it fine to always populate the header?
Yeah IMO this is fine to do. I could go either way on config. On one hand it seems like the right thing to do, on the other hand it should be strictly spec compliant. Maybe just add a runtime guard to turn it off and we can remove the guard after a release or two? WDYT?
To clarify, you suggest to (1) add this feature behind runtime flag, (2) enable this flag by default, (3) delete this flag in a release or two?
This works for me, I'll send a pull request shortly.
Activity
euroelessar commentedon Aug 7, 2019
I've made a quick prototype and this functionality (populating
content-length) can be done as part ofenvoy.bufferplugin. It looks like no changes are required in envoy core itself.Should I send a pull request? Should it be made configurable or is it fine to always populate the header?
mattklein123 commentedon Aug 7, 2019
Yeah IMO this is fine to do. I could go either way on config. On one hand it seems like the right thing to do, on the other hand it should be strictly spec compliant. Maybe just add a runtime guard to turn it off and we can remove the guard after a release or two? WDYT?
euroelessar commentedon Aug 7, 2019
To clarify, you suggest to (1) add this feature behind runtime flag, (2) enable this flag by default, (3) delete this flag in a release or two?
This works for me, I'll send a pull request shortly.
mattklein123 commentedon Aug 7, 2019
@euroelessar yes