From: robertc <> Date: Wed, 23 Jul 2003 16:41:20 +0000 (+0000) Subject: Summary: Fix ESI compilation after recent HttpHeader changes (bug #713). X-Git-Tag: SQUID_3_0_PRE2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=818c6c9eaa75bb59ca93aaa57140056412c24c7a;p=thirdparty%2Fsquid.git Summary: Fix ESI compilation after recent HttpHeader changes (bug #713). Keywords: httpHeaderInit no longer exists... users of it need to use the constructor instead. --- diff --git a/src/ESIInclude.cc b/src/ESIInclude.cc index 28da0737c9..e92af5a6d7 100644 --- a/src/ESIInclude.cc +++ b/src/ESIInclude.cc @@ -1,6 +1,6 @@ /* - * $Id: ESIInclude.cc,v 1.1 2003/07/14 14:15:55 robertc Exp $ + * $Id: ESIInclude.cc,v 1.2 2003/07/23 10:41:20 robertc Exp $ * * DEBUG: section 86 ESI processing * AUTHOR: Robert Collins @@ -345,8 +345,6 @@ ESIInclude::ESIInclude(ESIInclude const &old) : parent (NULL), started (false), void ESIInclude::prepareRequestHeaders(HttpHeader &tempheaders, ESIVarState *vars) { - httpHeaderInit (&tempheaders, hoRequest); - tempheaders.update (&vars->header(), NULL); tempheaders.removeConnectionHeaderEntries(); } @@ -355,11 +353,11 @@ ESIInclude::prepareRequestHeaders(HttpHeader &tempheaders, ESIVarState *vars) void ESIInclude::Start (ESIStreamContext::Pointer stream, char const *url, ESIVarState *vars) { - HttpHeader tempheaders; - if (!stream.getRaw()) return; + HttpHeader tempheaders(hoRequest); + prepareRequestHeaders(tempheaders, vars); /* Ensure variable state is clean */ diff --git a/src/ESIVarState.cc b/src/ESIVarState.cc index 8ee72aa778..8bebc10416 100644 --- a/src/ESIVarState.cc +++ b/src/ESIVarState.cc @@ -1,6 +1,6 @@ /* - * $Id: ESIVarState.cc,v 1.1 2003/07/14 14:15:55 robertc Exp $ + * $Id: ESIVarState.cc,v 1.2 2003/07/23 10:41:20 robertc Exp $ * * DEBUG: section 86 ESI processing * AUTHOR: Robert Collins @@ -303,13 +303,11 @@ ESIVariableQuery::~ESIVariableQuery() } ESIVarState::ESIVarState (HttpHeader const *aHeader, char const *uri) - : output (NULL) + : output (NULL), hdr(hoReply) { /* TODO: only grab the needed headers */ /* Note that as we pass these through to included requests, we * cannot trim them */ - httpHeaderInit (&hdr, hoReply); - httpHeaderAppend (&hdr, aHeader); /* populate our variables trie with the available variables. diff --git a/src/HttpHeaderTools.cc b/src/HttpHeaderTools.cc index be7d77a650..99f02802bd 100644 --- a/src/HttpHeaderTools.cc +++ b/src/HttpHeaderTools.cc @@ -1,6 +1,6 @@ /* - * $Id: HttpHeaderTools.cc,v 1.42 2003/06/19 19:02:33 hno Exp $ + * $Id: HttpHeaderTools.cc,v 1.43 2003/07/23 10:41:20 robertc Exp $ * * DEBUG: section 66 HTTP Header Tools * AUTHOR: Alex Rousskov @@ -400,7 +400,7 @@ httpHeaderTestParser(const char *hstr) static int bug_count = 0; int hstr_len; int parse_success; - HttpHeader hdr; + HttpHeader hdr(hoReply); int pos; Packer p; MemBuf mb; @@ -430,8 +430,6 @@ httpHeaderTestParser(const char *hstr) else if (strstr(hstr, "\n\n")) hstr_len -= 1; - httpHeaderInit(&hdr, hoReply); - /* Debug::Levels[55] = 8; */ parse_success = httpHeaderParse(&hdr, hstr, hstr + hstr_len); diff --git a/src/http.cc b/src/http.cc index db4d94c48d..e7ee003d96 100644 --- a/src/http.cc +++ b/src/http.cc @@ -1,6 +1,6 @@ /* - * $Id: http.cc,v 1.421 2003/07/15 20:20:33 hno Exp $ + * $Id: http.cc,v 1.422 2003/07/23 10:41:20 robertc Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -1109,7 +1109,7 @@ HttpStateData::SendComplete(int fd, char *bufnotused, size_t size, comm_err_t er /* * build request headers and append them to a given MemBuf * used by httpBuildRequestPrefix() - * note: calls httpHeaderInit(), the caller is responsible for Clean()-ing + * note: initialised the HttpHeader, the caller is responsible for Clean()-ing */ void httpBuildRequestHeader(request_t * request,