nghttpx: Defer validation of request form after mruby handler
This commit is contained in:
parent
bc31146c1f
commit
d508a0c72c
|
@ -350,11 +350,6 @@ int htp_hdrs_completecb(http_parser *htp) {
|
||||||
}
|
}
|
||||||
// checking UF_HOST could be redundant, but just in case ...
|
// checking UF_HOST could be redundant, but just in case ...
|
||||||
if (!(u.field_set & (1 << UF_SCHEMA)) || !(u.field_set & (1 << UF_HOST))) {
|
if (!(u.field_set & (1 << UF_SCHEMA)) || !(u.field_set & (1 << UF_HOST))) {
|
||||||
if (get_config()->http2_proxy && !faddr->alt_mode) {
|
|
||||||
// Request URI should be absolute-form for client proxy mode
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
req.no_authority = true;
|
req.no_authority = true;
|
||||||
|
|
||||||
if (method == HTTP_OPTIONS && req.path == StringRef::from_lit("*")) {
|
if (method == HTTP_OPTIONS && req.path == StringRef::from_lit("*")) {
|
||||||
|
@ -395,6 +390,11 @@ int htp_hdrs_completecb(http_parser *htp) {
|
||||||
|
|
||||||
// mruby hook may change method value
|
// mruby hook may change method value
|
||||||
|
|
||||||
|
if (req.no_authority && get_config()->http2_proxy && !faddr->alt_mode) {
|
||||||
|
// Request URI should be absolute-form for client proxy mode
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
if (downstream->get_response_state() == Downstream::MSG_COMPLETE) {
|
if (downstream->get_response_state() == Downstream::MSG_COMPLETE) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue