File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ F: Send + Sync + Fn(Request) -> Pin<Box<dyn Future<Output = Response> + Send>>
3939 match status_line {
4040 Some ( status_line) => {
4141 let status_lower = status_line. to_lowercase ( ) ;
42- if status_lower . contains ( "http/1." ) && ( status_lower. starts_with ( "get" ) || status_lower . starts_with ( "post" ) ) {
42+ if check_is_status_line ( status_lower) {
4343 parse_request_status_line ( status_line)
4444 } else {
4545 break ' root_loop;
@@ -214,6 +214,11 @@ F: Send + Sync + Fn(Request) -> Pin<Box<dyn Future<Output = Response> + Send>>
214214 }
215215}
216216
217+ //allow http 1.* & POST, GET, OPTIONS methods
218+ fn check_is_status_line ( line : String ) -> bool {
219+ line. contains ( "http/1." ) && ( line. starts_with ( "get" ) || line. starts_with ( "options" ) || line. starts_with ( "post" ) )
220+ }
221+
217222#[ allow( dead_code) ]
218223fn hex_string_to_int ( hex_string : & str ) -> Option < u64 > {
219224 match u64:: from_str_radix ( hex_string, 16 ) {
You can’t perform that action at this time.
0 commit comments