- implement more of those useful allocation relays
[m6w6/ext-http] / http_api.c
index 6f6c5d63993175d7fbc080c12461c6d64307ddf8..04e012133e8d94ace630d136b7c0e6908c201dcb 100644 (file)
@@ -283,7 +283,7 @@ STATUS _http_check_method_ex(const char *method, const char *methods)
 
        if (    (found = strstr(methods, method)) &&
                        (found == method || !isalpha(found[-1])) &&
-                       (!isalpha(found[strlen(method) + 1]))) {
+                       (strlen(found) >= strlen(method) && !isalpha(found[strlen(method)]))) {
                return SUCCESS;
        }
        return FAILURE;