diff --git a/src/shrpx_downstream.cc b/src/shrpx_downstream.cc index 831a3027..359787f9 100644 --- a/src/shrpx_downstream.cc +++ b/src/shrpx_downstream.cc @@ -914,8 +914,7 @@ size_t Downstream::get_response_datalen() const { return response_datalen_; } void Downstream::reset_response_datalen() { response_datalen_ = 0; } bool Downstream::expect_response_body() const { - return request_method_ != "HEAD" && response_http_status_ / 100 != 1 && - response_http_status_ != 304 && response_http_status_ != 204; + return http2::expect_response_body(request_method_, response_http_status_); } namespace {