-const char parsers_rcs[] = "$Id: parsers.c,v 1.148 2008/11/16 12:43:49 fabiankeil Exp $";
+const char parsers_rcs[] = "$Id: parsers.c,v 1.149 2008/11/21 18:39:53 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/parsers.c,v $
*
* Revisions :
* $Log: parsers.c,v $
+ * Revision 1.149 2008/11/21 18:39:53 fabiankeil
+ * In case of CONNECT requests there's no point
+ * in trying to keep the connection alive.
+ *
* Revision 1.148 2008/11/16 12:43:49 fabiankeil
* Turn keep-alive support into a runtime feature
* that is disabled by setting keep-alive-timeout
cur = csp->iob->cur;
- if (bufsize < 10)
+ if (bufsize < (size_t)10)
{
/*
* This is to protect the parsing of gzipped data,
*/
assert(zstr.avail_out == tmpbuf + bufsize - (char *)zstr.next_out);
assert((char *)zstr.next_out == tmpbuf + ((char *)oldnext_out - buf));
- assert(zstr.avail_out > 0);
+ assert(zstr.avail_out > 0U);
buf = tmpbuf;
}
&& (csp->iob->eod <= csp->iob->buf + csp->iob->size))
{
const size_t new_size = (size_t)(csp->iob->eod - csp->iob->cur);
- if (new_size > 0)
+ if (new_size > (size_t)0)
{
log_error(LOG_LEVEL_RE_FILTER,
"Decompression successful. Old size: %d, new size: %d.",
*********************************************************************/
static jb_err crumble(struct client_state *csp, char **header)
{
+ (void)csp;
log_error(LOG_LEVEL_HEADER, "crumble crunched: %s!", *header);
freez(*header);
return JB_ERR_OK;
(0 == strcmpic(csp->http->gpc, "options")))
{
assert(*(*header+12) == ':');
- if (1 == sscanf(*header+12, ": %u", &max_forwards))
+ if (1 == sscanf(*header+12, ": %d", &max_forwards))
{
if (max_forwards > 0)
{
- snprintf(*header, strlen(*header)+1, "Max-Forwards: %u", --max_forwards);
- log_error(LOG_LEVEL_HEADER, "Max-Forwards value for %s request reduced to %u.",
+ snprintf(*header, strlen(*header)+1, "Max-Forwards: %d", --max_forwards);
+ log_error(LOG_LEVEL_HEADER,
+ "Max-Forwards value for %s request reduced to %d.",
csp->http->gpc, max_forwards);
}
else if (max_forwards < 0)