------------------------------------------------------------ revno: 13408 revision-id: squid3@treenet.co.nz-20140509173225-3s1x3sr5j4mc1l8h parent: chtsanti@users.sourceforge.net-20140509151940-b1w133m4kqeaspcr committer: Amos Jeffries branch nick: trunk timestamp: Fri 2014-05-09 10:32:25 -0700 message: Check for PURGE method using method enum instead of strcmp() Removes one minor but needless drag on startup and reconfigure speed. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20140509173225-3s1x3sr5j4mc1l8h # target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: 59739e60f2bdc24e11f3f75efb8527853c4e0e18 # timestamp: 2014-05-09 17:54:42 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # base_revision_id: chtsanti@users.sourceforge.net-20140509151940-\ # b1w133m4kqeaspcr # # Begin patch === modified file 'src/acl/MethodData.cc' --- src/acl/MethodData.cc 2014-04-22 02:47:09 +0000 +++ src/acl/MethodData.cc 2014-05-09 17:32:25 +0000 @@ -89,9 +89,9 @@ for (Tail = &values; *Tail; Tail = &((*Tail)->next)); while ((t = strtokFile())) { - if (strcmp(t, "PURGE") == 0) + CbDataList *q = new CbDataList (HttpRequestMethod(t, NULL)); + if (q->element == Http::METHOD_PURGE) ++ThePurgeCount; // configuration code wants to know - CbDataList *q = new CbDataList (HttpRequestMethod(t, NULL)); *(Tail) = q; Tail = &q->next; }