Merge branch 'nghttp-not-upgrade-without-reason-phrase'
This commit is contained in:
commit
c6d65aad3b
|
@ -404,17 +404,10 @@ int htp_msg_begincb(http_parser *htp) {
|
||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
namespace {
|
|
||||||
int htp_statuscb(http_parser *htp, const char *at, size_t length) {
|
|
||||||
auto client = static_cast<HttpClient *>(htp->data);
|
|
||||||
client->upgrade_response_status_code = htp->status_code;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
} // namespace
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
int htp_msg_completecb(http_parser *htp) {
|
int htp_msg_completecb(http_parser *htp) {
|
||||||
auto client = static_cast<HttpClient *>(htp->data);
|
auto client = static_cast<HttpClient *>(htp->data);
|
||||||
|
client->upgrade_response_status_code = htp->status_code;
|
||||||
client->upgrade_response_complete = true;
|
client->upgrade_response_complete = true;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -424,7 +417,7 @@ namespace {
|
||||||
constexpr http_parser_settings htp_hooks = {
|
constexpr http_parser_settings htp_hooks = {
|
||||||
htp_msg_begincb, // http_cb on_message_begin;
|
htp_msg_begincb, // http_cb on_message_begin;
|
||||||
nullptr, // http_data_cb on_url;
|
nullptr, // http_data_cb on_url;
|
||||||
htp_statuscb, // http_data_cb on_status;
|
nullptr, // http_data_cb on_status;
|
||||||
nullptr, // http_data_cb on_header_field;
|
nullptr, // http_data_cb on_header_field;
|
||||||
nullptr, // http_data_cb on_header_value;
|
nullptr, // http_data_cb on_header_value;
|
||||||
nullptr, // http_cb on_headers_complete;
|
nullptr, // http_cb on_headers_complete;
|
||||||
|
|
Loading…
Reference in New Issue