From: wessels <> Date: Wed, 4 Dec 1996 00:00:11 +0000 (+0000) Subject: From: "Andres Kroonmaa" X-Git-Tag: SQUID_3_0_PRE1~5353 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=929545fe57ac8beee4bd6498b2ec23cd8b809520;p=thirdparty%2Fsquid.git From: "Andres Kroonmaa" Beta25 has a POST (and possibly HEAD) method broken. Constitutes as never-ending post request to server. I had a registration form that got broken by this. I investigated it a little and found soon that squid was prepending some garbage before POST header. I don't know the code too well and can't say if it brakes anything other, but I believe this patch below is for good. Basically, before sending POST request to server, request buffer has some garbage in it, and httpAppendRequestHeader appends to it, although code keeps track of how much it has written there, so I made it overwrite what was there and was not tracked for. Looks small fix, but it took me all day to trace... --- diff --git a/src/http.cc b/src/http.cc index f6040183bc..3ec6629574 100644 --- a/src/http.cc +++ b/src/http.cc @@ -1,5 +1,5 @@ /* - * $Id: http.cc,v 1.123 1996/12/02 05:55:08 wessels Exp $ + * $Id: http.cc,v 1.124 1996/12/03 17:00:11 wessels Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -618,7 +618,7 @@ httpAppendRequestHeader(char *hdr, const char *line, size_t * sz, size_t max) if (n >= max) return; debug(11, 5, "httpAppendRequestHeader: %s\n", line); - strcat(hdr + (*sz), line); + strcpy(hdr + (*sz), line); strcat(hdr + (*sz), crlf); *sz = n; }