From d11336cc70a6d520cbe59722475c99e0c998c8e3 Mon Sep 17 00:00:00 2001 From: wessels <> Date: Mon, 1 Dec 1997 09:17:29 +0000 Subject: [PATCH] persistent connection / content-length fix. For non-200 replies, we may or may not get a content-length. If there is no content-length, AND we've reached the end-of-headers, then we can still try being persistent. This was previously #ifdef'd out as 'NOT_SURE_THIS_MATTERS' --- src/http.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/http.cc b/src/http.cc index f2e15722e3..09257d0ed7 100644 --- a/src/http.cc +++ b/src/http.cc @@ -1,6 +1,6 @@ /* - * $Id: http.cc,v 1.224 1997/11/29 08:03:19 wessels Exp $ + * $Id: http.cc,v 1.225 1997/12/01 02:17:29 wessels Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -573,15 +573,14 @@ httpPconnTransferDone(HttpStateData * httpState) return 0; debug(11, 5) ("httpPconnTransferDone: content_length=%d\n", reply->content_length); -#if DONT_THINK_THIS_MATTERS /* * !200 replies maybe don't have content-length, so * if we saw the end of the headers then try being persistent. */ if (reply->code != 200) - if (httpState->reply_hdr_state > 1) - return 1; -#endif + if (reply->content_length < 0) + if (httpState->reply_hdr_state > 1) + return 1; /* * If there is no content-length, then we probably can't be persistent */ -- 2.47.3