We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the problem Fastly seems to exhibit a special behavior when there are multiple lines with the same header. https://fiddle.fastly.dev/fiddle/6221d4db
While the specific behavior needs to be verified accurately, I'll write test cases based on the current understanding.
VCL code that cause the problem / reproduceable https://fiddle.fastly.dev/fiddle/aa00bc57
// @scope: recv // @suite: ADD header(add-add-add) BUGGY sub test_recv { add req.http.VALUE = "V1"; add req.http.VALUE = "V2"; add req.http.VALUE = "V3"; # assert.equal(req.http.VALUE, "V1, V2, V3"); # request upstream with 3 line headers # assert.equal(resp.http.VALUE, "V1, V2, V3"); # response contains single line header with three values. set req.http.MESSAGE = req.http.VALUE; # set first header value assert.equal(req.http.MESSAGE, "V1"); } // @scope: recv // @suite: ADD header(set-add-add) BUGGY sub test_recv { set req.http.VALUE = "V1"; add req.http.VALUE = "V2"; add req.http.VALUE = "V3"; # assert.equal(req.http.VALUE, "V1, V2, V3"); # request upstream with 3 headers set req.http.MESSAGE = req.http.VALUE; # set first header value assert.equal(req.http.MESSAGE, "V1"); } // @scope: recv // @suite: ADD header(add-add-set) sub test_recv { add req.http.VALUE = "V1"; add req.http.VALUE = "V2"; set req.http.VALUE = "V3"; assert.equal(req.http.VALUE, "V3"); # 1 header set req.http.MESSAGE = req.http.VALUE; assert.equal(req.http.MESSAGE, "V3"); } // @scope: recv // @suite: UNSET header(add-add-unset) sub test_recv { add req.http.VALUE = "V1"; add req.http.VALUE = "V2"; unset req.http.VALUE; assert.is_notset(req.http.VALUE); # 0 header set req.http.MESSAGE = req.http.VALUE; assert.equal(req.http.MESSAGE, "(null)"); }
Additional context https://github.com/bungoume/falco-vcl-empty-test/blob/main/tests/header_multiline.test.vcl
The text was updated successfully, but these errors were encountered:
ysugimoto
No branches or pull requests
Describe the problem
Fastly seems to exhibit a special behavior when there are multiple lines with the same header.
https://fiddle.fastly.dev/fiddle/6221d4db
While the specific behavior needs to be verified accurately, I'll write test cases based on the current understanding.
VCL code that cause the problem / reproduceable
https://fiddle.fastly.dev/fiddle/aa00bc57
Additional context
https://github.com/bungoume/falco-vcl-empty-test/blob/main/tests/header_multiline.test.vcl
The text was updated successfully, but these errors were encountered: