From: wessels <> Date: Fri, 31 Jul 1998 20:48:13 +0000 (+0000) Subject: Fixed broken handling of HEAD replies which lack the empty X-Git-Tag: SQUID_3_0_PRE1~2946 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=782b5f40a3fc0bd3a2b24592868e9de530b461fd;p=thirdparty%2Fsquid.git Fixed broken handling of HEAD replies which lack the empty end-of-headers line. --- diff --git a/src/client_side.cc b/src/client_side.cc index 1895885576..de70cb2482 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side.cc,v 1.371 1998/07/31 00:15:38 wessels Exp $ + * $Id: client_side.cc,v 1.372 1998/07/31 14:48:13 wessels Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -1052,7 +1052,7 @@ clientBuildReply(clientHttpRequest * http, const char *buf, size_t size) rep = NULL; /* if we were going to do ranges, backoff */ if (http->request->range) - clientBuildRangeHeader(http, rep); /* will fail and destroy request->range */ + clientBuildRangeHeader(http, rep); /* will fail and destroy request->range */ } return rep; } @@ -1378,10 +1378,15 @@ clientSendMoreData(void *data, char *buf, ssize_t size) body_size = 0; http->flags.done_copying = 1; } else { - /* unparseable reply, stop and end-of-headers */ - body_size = headersEnd(buf, size); - if (body_size) - http->flags.done_copying = 1; + /* + * If we are here, then store_status == STORE_OK and it + * seems we have a HEAD repsponse which is missing the + * empty end-of-headers line (home.mira.net, phttpd/0.99.72 + * does this). Because clientBuildReply() fails we just + * call this reply a body, set the done_copying flag and + * continue... + */ + http->flags.done_copying = 1; } } /* write headers and/or body if any */