RE: frontpage patch for client_side.c in squid 2.2 stable 5

From: Wayne Smith <wcsmith@dont-contact.us>
Date: Tue, 11 Jul 2000 07:06:10 -0400

On the error message:

gcc -g -O2 -Wall -D_REENTRANT -I. -I../include -I../include -c -o
client_side
.o client_side.c
client_side.c: In function `clientCheckContentLength':
client_side.c:877: structure has no member named `content_length'

The relevant section from client_side.c is:

static int
clientCheckContentLength(request_t * r)
{
    switch (r->method) {
    case METHOD_PUT:
    case METHOD_POST:
        /* PUT/POST requires a request entity */
        return (r->content_length >= 0);
    case METHOD_GET:
    case METHOD_HEAD:
        /* We do not want to see a request entity on GET/HEAD requests */
      return (r->content_length <= 0);
    default:
        /* For other types of requests we don't care */
        return 1;
    }
    /* NOT REACHED */
}

This is a cut and paste of the function as it is after patching. Basically,
I cut and pasted from a copy of Stable 2.3 Stable 3 with the patch. I also
tried making the one line modification Henrik mentioned in his original
reply about Quicken (and subsequently repeated regarding frontpage). That
mod was only for the two cases of METHOD_GET and METHOD_HEAD, and would end
up like

    case METHOD_GET:
    case METHOD_HEAD:
        /* We do not want to see a request entity with data on GET/HEAD
requests */
return r->content_length <= 0;

Probably missing something stupid, but I don't claim to code. Any thoughts
are appreciated!

*************************************************
Wayne Smith, CNE/MCSE/CCNP/CCDP
Computer Resources (http://www.cros.net)
Received on Tue Jul 11 2000 - 05:09:05 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:54:29 MST