nghttpd: Fix compiler warning

This commit is contained in:
Tatsuhiro Tsujikawa 2014-05-11 21:51:25 +09:00
parent 9683f88e6a
commit d3fa938f1f
1 changed files with 4 additions and 1 deletions

View File

@ -1060,7 +1060,10 @@ void prepare_status_response(Stream *stream, Http2Handler *hd,
gzclose(write_fd); gzclose(write_fd);
headers.emplace_back("content-encoding", "gzip"); headers.emplace_back("content-encoding", "gzip");
} else { } else {
write(pipefd[1], body.c_str(), body.size()); auto rv = write(pipefd[1], body.c_str(), body.size());
if(rv != static_cast<ssize_t>(body.size())) {
std::cerr << "Could not write all response body: " << rv << std::endl;
}
} }
close(pipefd[1]); close(pipefd[1]);