From d3fa938f1fad02c8ddc8ee1f178fa2f795c0217b Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 11 May 2014 21:51:25 +0900 Subject: [PATCH] nghttpd: Fix compiler warning --- src/HttpServer.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/HttpServer.cc b/src/HttpServer.cc index 24aaf581..e3735140 100644 --- a/src/HttpServer.cc +++ b/src/HttpServer.cc @@ -1060,7 +1060,10 @@ void prepare_status_response(Stream *stream, Http2Handler *hd, gzclose(write_fd); headers.emplace_back("content-encoding", "gzip"); } else { - write(pipefd[1], body.c_str(), body.size()); + auto rv = write(pipefd[1], body.c_str(), body.size()); + if(rv != static_cast(body.size())) { + std::cerr << "Could not write all response body: " << rv << std::endl; + } } close(pipefd[1]);