[squid-users] Return code 411 (Length required) for simple get

From: <mcnatton@dont-contact.us>
Date: Wed, 20 Jun 2001 09:50:32 -0400

I'm having a problem with a vendor application trying to do a
simple get through my squid server (squid2.3Stable4), I highly
suspect it's a vendor issue, but I am looking for some backup here.

The request looks like:
HTTP: GET http://204.216.56.91/owa_ffw/owa/H.GetPI HTTP/1.0
HTTP: Accept: */*
HTTP: Host: 204.216.56.91
HTTP: Content-length: 0

The reply from squid is:
HTTP: HTTP/1.0 411 Length Required
HTTP: Server: Squid/2.3.STABLE4
HTTP: Mime-Version: 1.0
HTTP: Date: Wed, 20 Jun 2001 13:28:34 GMT
HTTP: Content-Type: text/html
HTTP: Content-Length: 843
HTTP: Expires: Wed, 20 Jun 2001 13:28:34 GMT
HTTP: X-Squid-Error: ERR_INVALID_REQ 0
HTTP: X-Cache: MISS from launchpad.wcpss.net
HTTP: Proxy-Connection: close

The code that catches this reads as follows, which makes me think that
the content-length 0 in the GET header is a no no. Is this correct?

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

Any insight is greatly appreciated.

Thanks,
-- steve
Received on Wed Jun 20 2001 - 07:50:38 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:00:48 MST