This repository has been archived by the owner on Jul 30, 2021. It is now read-only.
Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Do not consider a CR by itself as a valid line terminator
Varnish (prior to version 4.0) was not following the standard with regard to line separator. Spotted and analyzed by: Régis Leroy [regilero] regis.leroy@makina-corpus.com
- Loading branch information
1 parent
9190770
commit 85e8468
Showing
4 changed files
with
37 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| varnishtest "Do not consider CR as a valid line separator" | ||
|
|
||
| server s1 { | ||
| rxreq | ||
| txresp | ||
| } -start | ||
|
|
||
| varnish v1 -vcl+backend { | ||
| sub vcl_deliver { | ||
| if (req.http.foo) { | ||
| set resp.http.Foo = req.http.foo; | ||
| } | ||
| if (req.http.bar) { | ||
| set resp.http.Bar = req.http.bar; | ||
| } | ||
| } | ||
| } -start | ||
|
|
||
| client c1 { | ||
| send "GET / HTTP/1.1\r\nFoo: foo\rBar: bar\r\n\r\n" | ||
| rxresp | ||
| expect resp.http.foo == "foo\rBar: bar" | ||
| expect resp.http.bar == "<undef>" | ||
| } -run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters