]> err.no Git - varnish/commitdiff
Don't rewrite pipe'ed requests to "GET".
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 6 Jul 2007 10:07:30 +0000 (10:07 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 6 Jul 2007 10:07:30 +0000 (10:07 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1658 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_http.c

index e3ff9f407b5e1af21813c1138c246bd17e1ac0c8..602fd38ff110499068458acaca8a72905e965ee3 100644 (file)
@@ -709,12 +709,15 @@ http_copyh(struct http *to, struct http *fm, unsigned n)
 }
 
 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 @@ http_FilterHeader(struct sess *sp, unsigned how)
         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,