Re: [PATCH] send HTTP/1.1 requests to HTTP servers for selected requests

From: Henrik Nordström <henrik_at_henriknordstrom.net>
Date: Tue, 02 Mar 2010 00:12:49 +0100

tis 2010-03-02 klockan 11:17 +1300 skrev Amos Jeffries:

> * stripping Expect: headers on requests (by skipping 417 abort plus
> "request_header_access Expect deny all")

Haven't seen any need for skipping/filtering the Expect header. Squid-2
forwards any received Expect headers.

> * ignoring Expect: headers and stripping the 1xx replies. (as per 2.7
> ignore_expect_100)

The relevant Squid-2 code reads as follows:

    if (httpHeaderHas(&r->header, HDR_EXPECT)) {
        int ignore = 0;
        if (Config.onoff.ignore_expect_100) {
            String expect = httpHeaderGetList(&r->header, HDR_EXPECT);
            if (strCaseCmp(expect, "100-continue") == 0)
                ignore = 1;
            stringClean(&expect);
        }
        if (!ignore) {
            ErrorState *err = errorCon(ERR_INVALID_REQ, HTTP_EXPECTATION_FAILED, r);
            http->log_type = LOG_TCP_MISS;
            http->entry = clientCreateStoreEntry(http, http->request->method, null_request_flags);
            errorAppendEntry(http->entry, err);
            return;
        }
    }

that's all there is, as there is no way Squid-2 can fulfill any Expect rules yet...

Regards
Henrik
Received on Mon Mar 01 2010 - 23:12:53 MST

This archive was generated by hypermail 2.2.0 : Tue Mar 02 2010 - 12:00:04 MST