File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,8 @@ static const char *method_strings[] =
95
95
, "MERGE"
96
96
, "M-SEARCH"
97
97
, "NOTIFY"
98
+ , "SUBSCRIBE"
99
+ , "UNSUBSCRIBE"
98
100
};
99
101
100
102
@@ -582,8 +584,9 @@ size_t http_parser_execute (http_parser *parser,
582
584
case 'O' : parser -> method = HTTP_OPTIONS ; break ;
583
585
case 'P' : parser -> method = HTTP_POST ; /* or PROPFIND or PROPPATCH or PUT */ break ;
584
586
case 'R' : parser -> method = HTTP_REPORT ; break ;
587
+ case 'S' : parser -> method = HTTP_SUBSCRIBE ; break ;
585
588
case 'T' : parser -> method = HTTP_TRACE ; break ;
586
- case 'U' : parser -> method = HTTP_UNLOCK ; break ;
589
+ case 'U' : parser -> method = HTTP_UNLOCK ; /* or UNSUBSCRIBE */ break ;
587
590
default : goto error ;
588
591
}
589
592
state = s_req_method ;
@@ -620,6 +623,8 @@ size_t http_parser_execute (http_parser *parser,
620
623
parser -> method = HTTP_PROPFIND ; /* or HTTP_PROPPATCH */
621
624
} else if (index == 1 && parser -> method == HTTP_POST && ch == 'U' ) {
622
625
parser -> method = HTTP_PUT ;
626
+ } else if (index == 2 && parser -> method == HTTP_UNLOCK && ch == 'S' ) {
627
+ parser -> method = HTTP_UNSUBSCRIBE ;
623
628
} else if (index == 4 && parser -> method == HTTP_PROPFIND && ch == 'P' ) {
624
629
parser -> method = HTTP_PROPPATCH ;
625
630
} else {
Original file line number Diff line number Diff line change @@ -101,9 +101,11 @@ enum http_method
101
101
, HTTP_MKACTIVITY
102
102
, HTTP_CHECKOUT
103
103
, HTTP_MERGE
104
- /* ssdp */
104
+ /* upnp */
105
105
, HTTP_MSEARCH
106
106
, HTTP_NOTIFY
107
+ , HTTP_SUBSCRIBE
108
+ , HTTP_UNSUBSCRIBE
107
109
};
108
110
109
111
You can’t perform that action at this time.
0 commit comments