diff --git a/tutorial/tutorial-05-http_proxy.cc b/tutorial/tutorial-05-http_proxy.cc index 6dcae329..9690e03b 100644 --- a/tutorial/tutorial-05-http_proxy.cc +++ b/tutorial/tutorial-05-http_proxy.cc @@ -68,8 +68,8 @@ void http_callback(WFHttpTask *task) context->proxy_task->set_callback(reply_callback); /* Copy the remote webserver's response, to proxy response. */ - if (resp->get_parsed_body(&body, &len)) - resp->append_output_body_nocopy(body, len); + resp->get_parsed_body(&body, &len); + resp->append_output_body_nocopy(body, len); *proxy_resp = std::move(*resp); if (!context->is_keep_alive) proxy_resp->set_header_pair("Connection", "close");