From: Amos Jeffries Date: Fri, 9 May 2014 17:32:25 +0000 (-0700) Subject: Check for PURGE method using method enum instead of strcmp() X-Git-Tag: SQUID_3_5_0_1~237 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d73e600fac4cabc4c6f39265ffc27cedc4a284d9;p=thirdparty%2Fsquid.git Check for PURGE method using method enum instead of strcmp() Removes one minor but needless drag on startup and reconfigure speed. --- diff --git a/src/acl/MethodData.cc b/src/acl/MethodData.cc index 6fad15ef90..dd00ff1546 100644 --- a/src/acl/MethodData.cc +++ b/src/acl/MethodData.cc @@ -89,9 +89,9 @@ ACLMethodData::parse() for (Tail = &values; *Tail; Tail = &((*Tail)->next)); while ((t = strtokFile())) { - if (strcmp(t, "PURGE") == 0) - ++ThePurgeCount; // configuration code wants to know CbDataList *q = new CbDataList (HttpRequestMethod(t, NULL)); + if (q->element == Http::METHOD_PURGE) + ++ThePurgeCount; // configuration code wants to know *(Tail) = q; Tail = &q->next; }