114f6f50e9
- Added a patch fixing a missing echo in the init script that masked failure output from the script - Added a patch from upstream, fixing a problem with Content-Length headers (upstream r5461, upstream bug #801) - Added a patch from upstream, adding empty Default-Start and Default-Stop to initscripts for better lsb compliance - Added varnish_reload_vcl from trunk - Synced descriptions from release spec
47 lines
1.1 KiB
Diff
47 lines
1.1 KiB
Diff
Index: bin/varnishtest/tests/r00801.vtc
|
|
===================================================================
|
|
--- bin/varnishtest/tests/r00801.vtc (revisjon 0)
|
|
+++ bin/varnishtest/tests/r00801.vtc (revisjon 5461)
|
|
@@ -0,0 +1,24 @@
|
|
+# $Id$
|
|
+
|
|
+test "Regression test for duplicate content-length in pass"
|
|
+
|
|
+server s1 {
|
|
+ rxreq
|
|
+ txresp \
|
|
+ -hdr "Date: Mon, 25 Oct 2010 06:34:06 GMT" \
|
|
+ -hdr "Content-length: 10xx" \
|
|
+ -nolen -bodylen 10
|
|
+} -start
|
|
+
|
|
+
|
|
+varnish v1 -vcl+backend {
|
|
+ sub vcl_recv { return (pass); }
|
|
+} -start
|
|
+
|
|
+client c1 {
|
|
+ txreq
|
|
+ rxresp
|
|
+ expect resp.http.content-length == "10"
|
|
+} -run
|
|
+
|
|
+
|
|
Index: bin/varnishd/cache_fetch.c
|
|
===================================================================
|
|
--- bin/varnishd/cache_fetch.c (revisjon 5460)
|
|
+++ bin/varnishd/cache_fetch.c (revisjon 5461)
|
|
@@ -552,9 +552,11 @@
|
|
assert(uu == sp->obj->len);
|
|
}
|
|
|
|
- if (mklen > 0)
|
|
+ if (mklen > 0) {
|
|
+ http_Unset(sp->obj->http, H_Content_Length);
|
|
http_PrintfHeader(sp->wrk, sp->fd, sp->obj->http,
|
|
"Content-Length: %u", sp->obj->len);
|
|
+ }
|
|
|
|
if (http_HdrIs(hp, H_Connection, "close"))
|
|
cls = 1;
|