r1658 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Fri Jul 6 12:07:30 CEST 2007
Author: phk
Date: 2007-07-06 12:07:30 +0200 (Fri, 06 Jul 2007)
New Revision: 1658
Modified:
trunk/varnish-cache/bin/varnishd/cache_http.c
Log:
Don't rewrite pipe'ed requests to "GET".
Modified: trunk/varnish-cache/bin/varnishd/cache_http.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_http.c 2007-07-05 21:08:15 UTC (rev 1657)
+++ trunk/varnish-cache/bin/varnishd/cache_http.c 2007-07-06 10:07:30 UTC (rev 1658)
@@ -709,12 +709,15 @@
}
static void
-http_getreq(struct http *to, struct http *fm)
+http_copyreq(struct http *to, struct http *fm, int forceget)
{
CHECK_OBJ_NOTNULL(fm, HTTP_MAGIC);
CHECK_OBJ_NOTNULL(to, HTTP_MAGIC);
- http_seth(to, HTTP_HDR_REQ, "GET");
+ if (forceget)
+ http_seth(to, HTTP_HDR_REQ, "GET");
+ else
+ http_copyh(to, fm, HTTP_HDR_REQ);
http_copyh(to, fm, HTTP_HDR_URL);
http_seth(to, HTTP_HDR_PROTO, "HTTP/1.1");
}
@@ -797,7 +800,7 @@
hp = bereq->http;
hp->logtag = HTTP_Tx;
- http_getreq(hp, sp->http);
+ http_copyreq(hp, sp->http, how != HTTPH_R_PIPE);
http_FilterFields(sp->wrk, sp->fd, hp, sp->http, how);
http_PrintfHeader(sp->wrk, sp->fd, hp, "X-Varnish: %u", sp->xid);
http_PrintfHeader(sp->wrk, sp->fd, hp,
More information about the varnish-commit
mailing list