Early return after :method is seen
This commit is contained in:
parent
f755ea3894
commit
3dbd2d31bd
|
@ -494,10 +494,12 @@ void nghttp2_http_record_request_method(nghttp2_stream *stream,
|
|||
return;
|
||||
}
|
||||
|
||||
/* TODO we should do this in stricter manner. */
|
||||
/* TODO we should do this strictly. */
|
||||
for (i = 0; i < nvlen; ++i) {
|
||||
const nghttp2_nv *nv = &nva[i];
|
||||
if (lookup_token(nv->name, nv->namelen) == NGHTTP2_TOKEN__METHOD) {
|
||||
if (lookup_token(nv->name, nv->namelen) != NGHTTP2_TOKEN__METHOD) {
|
||||
continue;
|
||||
}
|
||||
if (streq("CONNECT", nv->value, nv->valuelen)) {
|
||||
stream->http_flags |= NGHTTP2_HTTP_FLAG_METH_CONNECT;
|
||||
return;
|
||||
|
@ -506,6 +508,6 @@ void nghttp2_http_record_request_method(nghttp2_stream *stream,
|
|||
stream->http_flags |= NGHTTP2_HTTP_FLAG_METH_HEAD;
|
||||
return;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue