, s_req_http_major
, s_req_first_http_minor
, s_req_http_minor
+ , s_req_spamc_start
+ , s_req_spamc
, s_req_line_almost_done
, s_header_field_start
/* or PROPFIND|PROPPATCH|PUT|PATCH|PURGE */
break;
case 'R': parser->method = HTTP_REPORT; break;
- case 'S': parser->method = HTTP_SUBSCRIBE; /* or SEARCH */ break;
+ case 'S': parser->method = HTTP_SUBSCRIBE; /* or SEARCH or SYMBOLS */ break;
case 'T': parser->method = HTTP_TRACE; break;
case 'U': parser->method = HTTP_UNLOCK; /* or UNSUBSCRIBE */ break;
default:
matcher = method_strings[parser->method];
if (ch == ' ' && matcher[parser->index] == '\0') {
- parser->state = s_req_spaces_before_url;
+ if (parser->method != HTTP_SYMBOLS && parser->method != HTTP_CHECK) {
+ parser->state = s_req_spaces_before_url;
+ }
+ else {
+ parser->state = s_req_spamc_start;
+ }
} else if (ch == matcher[parser->index]) {
; /* nada */
} else if (parser->method == HTTP_CONNECT) {
if (parser->index == 1 && ch == 'H') {
- parser->method = HTTP_CHECKOUT;
+ /* XXX: CHECKOUT has been removed */
+ parser->method = HTTP_CHECK;
} else if (parser->index == 2 && ch == 'P') {
parser->method = HTTP_COPY;
} else {
} else if (parser->method == HTTP_SUBSCRIBE) {
if (parser->index == 1 && ch == 'E') {
parser->method = HTTP_SEARCH;
- } else {
+ } else if (ch == 'Y') {
+ parser->method = HTTP_SYMBOLS;
+ }
+ else {
SET_ERRNO(HPE_INVALID_METHOD);
goto error;
}
break;
}
+ case s_req_spamc_start:
+ switch (ch) {
+ case 'S':
+ parser->state = s_req_spamc;
+ break;
+ case ' ':
+ break;
+ default:
+ SET_ERRNO(HPE_INVALID_CONSTANT);
+ goto error;
+ }
+ break;
+
+ case s_req_spamc:
+ {
+ if (ch == CR) {
+ parser->state = s_req_line_almost_done;
+ }
+ else if (ch == LF) {
+ parser->state = s_header_field_start;
+ }
+ break;
+ }
/* end of request line */
case s_req_line_almost_done: