|
|
|
@ -936,6 +936,7 @@ size_t http_parser_execute (http_parser *parser,
|
|
|
|
|
} else if (parser->index == 2 && ch == 'P') {
|
|
|
|
|
parser->method = HTTP_COPY;
|
|
|
|
|
} else {
|
|
|
|
|
SET_ERRNO(HPE_INVALID_METHOD);
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
} else if (parser->method == HTTP_MKCOL) {
|
|
|
|
@ -948,12 +949,14 @@ size_t http_parser_execute (http_parser *parser,
|
|
|
|
|
} else if (parser->index == 2 && ch == 'A') {
|
|
|
|
|
parser->method = HTTP_MKACTIVITY;
|
|
|
|
|
} else {
|
|
|
|
|
SET_ERRNO(HPE_INVALID_METHOD);
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
} else if (parser->method == HTTP_SUBSCRIBE) {
|
|
|
|
|
if (parser->index == 1 && ch == 'E') {
|
|
|
|
|
parser->method = HTTP_SEARCH;
|
|
|
|
|
} else {
|
|
|
|
|
SET_ERRNO(HPE_INVALID_METHOD);
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
} else if (parser->index == 1 && parser->method == HTTP_POST) {
|
|
|
|
@ -964,13 +967,27 @@ size_t http_parser_execute (http_parser *parser,
|
|
|
|
|
} else if (ch == 'A') {
|
|
|
|
|
parser->method = HTTP_PATCH;
|
|
|
|
|
} else {
|
|
|
|
|
SET_ERRNO(HPE_INVALID_METHOD);
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
} else if (parser->index == 2) {
|
|
|
|
|
if (parser->method == HTTP_PUT) {
|
|
|
|
|
if (ch == 'R') parser->method = HTTP_PURGE;
|
|
|
|
|
if (ch == 'R') {
|
|
|
|
|
parser->method = HTTP_PURGE;
|
|
|
|
|
} else {
|
|
|
|
|
SET_ERRNO(HPE_INVALID_METHOD);
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
} else if (parser->method == HTTP_UNLOCK) {
|
|
|
|
|
if (ch == 'S') parser->method = HTTP_UNSUBSCRIBE;
|
|
|
|
|
if (ch == 'S') {
|
|
|
|
|
parser->method = HTTP_UNSUBSCRIBE;
|
|
|
|
|
} else {
|
|
|
|
|
SET_ERRNO(HPE_INVALID_METHOD);
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
SET_ERRNO(HPE_INVALID_METHOD);
|
|
|
|
|
goto error;
|
|
|
|
|
}
|
|
|
|
|
} else if (parser->index == 4 && parser->method == HTTP_PROPFIND && ch == 'P') {
|
|
|
|
|
parser->method = HTTP_PROPPATCH;
|
|
|
|
|