Explorar o código

Prepare plugin interface for HTTP/2

bel2125 %!s(int64=5) %!d(string=hai) anos
pai
achega
e38bd3a9e1
Modificáronse 1 ficheiros con 3 adicións e 4 borrados
  1. 3 4
      src/civetweb.c

+ 3 - 4
src/civetweb.c

@@ -10829,10 +10829,9 @@ parse_http_request(char *buf, int len, struct mg_request_info *ri)
 	}
 
 #if defined(USE_HTTP2)
-	if (request_length >= http2_pri_hdr_line_len) {
-		if (0 == memcmp(buf, http2_pri, http2_pri_hdr_line_len)) {
-			is_http2 = 1;
-		}
+	static int is_http2_header(const char *buf, size_t buflen);
+	if (is_http2_header(buf, request_length)) {
+		is_http2 = 1;
 	}
 #endif