This repository was archived by the owner on Nov 6, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -1000,6 +1000,13 @@ size_t http_parser_execute (http_parser *parser,
1000
1000
UPDATE_STATE (s_req_spaces_before_url );
1001
1001
} else if (ch == matcher [parser -> index ]) {
1002
1002
; /* nada */
1003
+ } else if (parser -> method == HTTP_LOCK ) {
1004
+ if (parser -> index == 1 && ch == 'I' ) {
1005
+ parser -> method = HTTP_LINK ;
1006
+ } else {
1007
+ SET_ERRNO (HPE_INVALID_METHOD );
1008
+ goto error ;
1009
+ }
1003
1010
} else if (parser -> method == HTTP_CONNECT ) {
1004
1011
if (parser -> index == 1 && ch == 'H' ) {
1005
1012
parser -> method = HTTP_CHECKOUT ;
@@ -1070,6 +1077,13 @@ size_t http_parser_execute (http_parser *parser,
1070
1077
SET_ERRNO (HPE_INVALID_METHOD );
1071
1078
goto error ;
1072
1079
}
1080
+ } else if (parser -> method == HTTP_UNLOCK && parser -> index == 3 ) {
1081
+ if (ch == 'I' ) {
1082
+ parser -> method = HTTP_UNLINK ;
1083
+ } else {
1084
+ SET_ERRNO (HPE_INVALID_METHOD );
1085
+ goto error ;
1086
+ }
1073
1087
} else if (parser -> index == 4 && parser -> method == HTTP_PROPFIND && ch == 'P' ) {
1074
1088
parser -> method = HTTP_PROPPATCH ;
1075
1089
} else {
Original file line number Diff line number Diff line change @@ -124,6 +124,9 @@ typedef int (*http_cb) (http_parser*);
124
124
XX (29 , PURGE , PURGE ) \
125
125
/* CalDAV */ \
126
126
XX (30 , MKCALENDAR , MKCALENDAR ) \
127
+ /* RFC-7237 */ \
128
+ XX (31 , LINK , LINK ) \
129
+ XX (32 , UNLINK , UNLINK ) \
127
130
128
131
enum http_method
129
132
{
You can’t perform that action at this time.
0 commit comments