[Varnish] #197: HTTP/1.0 query return no content
Varnish
varnish-bugs at projects.linpro.no
Mon Jan 14 10:18:50 CET 2008
#197: HTTP/1.0 query return no content
----------------------+-----------------------------------------------------
Reporter: chr79 | Owner: phk
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishd | Version: 1.1.2
Severity: normal | Keywords:
----------------------+-----------------------------------------------------
Varnish return no content when a query use HTTP/1.0 and the backend don't
send a content-header.
Log sample :
{{{
15 TxRequest b GET
15 TxURL b /bug.php
15 TxProtocol b HTTP/1.0
...
15 RxProtocol b HTTP/1.1
15 RxStatus b 200
15 RxResponse b OK
15 RxHeader b Date: Fri, 11 Jan 2008 14:32:33 GMT
15 RxHeader b Server: Microsoft-IIS/4.0
15 RxHeader b Connection: close
15 RxHeader b Content-Type: text/css; charset: UTF-8
13 ObjProtocol c HTTP/1.1
13 ObjStatus c 200
13 ObjResponse c OK
13 ObjHeader c Date: Fri, 11 Jan 2008 14:32:33 GMT
13 ObjHeader c Server: -
13 ObjHeader c Content-Type: text/css; charset: UTF-8
15 BackendClose b default
13 TTL c 1588262781 RFC 120 1200061953 1200061953 0 0 0
13 VCL_call c fetch
13 VCL_return c pass
13 Length c 0
13 VCL_call c deliver
}}}
this can be solved by patching /bin/varnishd/cache_fetch.c :
{{{
@@ -343,7 +343,7 @@
VSL(SLT_Debug, vc->fd, "Invalid Transfer-Encoding");
VBE_ClosedFd(sp->wrk, vc);
return (-1);
- } else if (strcmp(http_GetProto(hp), "HTTP/1.1")) {
+ } else if ((strcmp(http_GetProto(hp), "HTTP/1.1")) ||
(strcmp(http_GetProto(hp), "HTTP/1.0"))) {
switch (http_GetStatus(hp)) {
case 200:
cls = fetch_eof(sp, vc->fd, hp);
}}}
--
Ticket URL: <http://varnish.projects.linpro.no/ticket/197>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list