From 0d421b5c3935077e2fc502f561d7861126e6fdeb Mon Sep 17 00:00:00 2001 From: Robert James Kaes Date: Wed, 29 Mar 2000 16:17:37 +0000 Subject: Fixed a bug with the clientreq function which was incorrectly setting the clientheader flag and causing _all_ headers to be sent even in anonymous mode. --- src/reqs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/reqs.c b/src/reqs.c index d7c5227..888fb2d 100644 --- a/src/reqs.c +++ b/src/reqs.c @@ -1,4 +1,4 @@ -/* $Id: reqs.c,v 1.4 2000-03-28 16:41:45 rjkaes Exp $ +/* $Id: reqs.c,v 1.5 2000-03-29 16:17:37 rjkaes Exp $ * * This is where all the work in tinyproxy is actually done. Incoming * connections are added to the active list of connections and then the header @@ -287,7 +287,7 @@ static int clientreq(struct conn_s *connptr) * through, the POST will not work. This _definitely_ needs to be * fixed. - rjkaes */ - if (!xstrstr(inbuf, "POST ", 5, FALSE)) { + if (xstrstr(inbuf, "POST ", 5, FALSE)) { connptr->clientheader = TRUE; } @@ -371,10 +371,12 @@ static int anonheader(char *line) assert(line); assert(allowedhdrs); + /* if (!xstrstr(line, "GET ", 4, FALSE) || !xstrstr(line, "POST ", 5, FALSE) || !xstrstr(line, "HEAD ", 5, FALSE)) return 1; + */ for (allowedptr = allowedhdrs; allowedptr; allowedptr = allowedptr->next) { -- cgit v1.2.3