/*
- * $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
void
ESIInclude::prepareRequestHeaders(HttpHeader &tempheaders, ESIVarState *vars)
{
- httpHeaderInit (&tempheaders, hoRequest);
-
tempheaders.update (&vars->header(), NULL);
tempheaders.removeConnectionHeaderEntries();
}
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 */
/*
- * $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
}
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.
/*
- * $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
static int bug_count = 0;
int hstr_len;
int parse_success;
- HttpHeader hdr;
+ HttpHeader hdr(hoReply);
int pos;
Packer p;
MemBuf mb;
else if (strstr(hstr, "\n\n"))
hstr_len -= 1;
- httpHeaderInit(&hdr, hoReply);
-
/* Debug::Levels[55] = 8; */
parse_success = httpHeaderParse(&hdr, hstr, hstr + hstr_len);
/*
- * $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
/*
* 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,