nghttpx: Fix bug that PUSH_PROMISE is sent after associated response HEADERS

This commit is contained in:
Tatsuhiro Tsujikawa 2015-05-22 00:53:02 +09:00
parent 28adb2dad3
commit 890a10b216
1 changed files with 7 additions and 7 deletions

View File

@ -1317,13 +1317,6 @@ int Http2Upstream::on_downstream_header_complete(Downstream *downstream) {
data_prdptr = nullptr;
}
rv = nghttp2_submit_response(session_, downstream->get_stream_id(),
nva.data(), nva.size(), data_prdptr);
if (rv != 0) {
ULOG(FATAL, this) << "nghttp2_submit_response() failed";
return -1;
}
// We need some conditions that must be fulfilled to initiate server
// push.
//
@ -1353,6 +1346,13 @@ int Http2Upstream::on_downstream_header_complete(Downstream *downstream) {
}
}
rv = nghttp2_submit_response(session_, downstream->get_stream_id(),
nva.data(), nva.size(), data_prdptr);
if (rv != 0) {
ULOG(FATAL, this) << "nghttp2_submit_response() failed";
return -1;
}
return 0;
}