coar 98/07/03 13:06:02
Modified: src CHANGES src/main http_core.c Log: Fix <Limit> parsing; "GET" and "get" are distinct methods. Revision Changes Path 1.944 +3 -0 apache-1.3/src/CHANGES Index: CHANGES =================================================================== RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.943 retrieving revision 1.944 diff -u -r1.943 -r1.944 --- CHANGES 1998/07/01 18:18:23 1.943 +++ CHANGES 1998/07/03 20:05:58 1.944 @@ -1,5 +1,8 @@ Changes with Apache 1.3.1 + *) The <Limit> parsing routine was incorrectly treating methods in + a case-insensitive way. [Ken Coar] + *) The ap_bprintf() code neglected to test if there was an error on the connection. ap_bflush() misdiagnosed a failure as a success. [Dean Gaudet] 1.207 +9 -8 apache-1.3/src/main/http_core.c Index: http_core.c =================================================================== RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v retrieving revision 1.206 retrieving revision 1.207 diff -u -r1.206 -r1.207 --- http_core.c 1998/07/03 16:47:29 1.206 +++ http_core.c 1998/07/03 20:06:00 1.207 @@ -1019,27 +1019,28 @@ */ while (limited_methods[0]) { - char *method = ap_getword_conf (cmd->pool, &limited_methods); - if (!strcasecmp(method, "GET")) { + char *method = ap_getword_conf(cmd->pool, &limited_methods); + if (!strcmp(method, "GET")) { limited |= (1 << M_GET); } - else if (!strcasecmp(method, "PUT")) { + else if (!strcmp(method, "PUT")) { limited |= (1 << M_PUT); } - else if (!strcasecmp(method, "POST")) { + else if (!strcmp(method, "POST")) { limited |= (1 << M_POST); } - else if (!strcasecmp(method, "DELETE")) { + else if (!strcmp(method, "DELETE")) { limited |= (1 << M_DELETE); } - else if (!strcasecmp(method, "CONNECT")) { + else if (!strcmp(method, "CONNECT")) { limited |= (1 << M_CONNECT); } - else if (!strcasecmp(method, "OPTIONS")) { + else if (!strcmp(method, "OPTIONS")) { limited |= (1 << M_OPTIONS); } else { - return "unknown method in <Limit>"; + return ap_pstrcat(cmd->pool, "unknown method \"", + method, "\" in <Limit>", NULL); } }