Skip to content

Commit

Permalink
show Transfer-Encoding: chunked
Browse files Browse the repository at this point in the history
  • Loading branch information
ithewei committed Sep 23, 2022
1 parent 9a0aecc commit 1e1fbae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/httpd/handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,11 @@ int Handler::sendLargeFile(const HttpContextPtr& ctx) {
}
size_t filesize = file.size();
ctx->writer->WriteHeader("Content-Type", http_content_type_str(content_type));
#if USE_TRANSFER_ENCODING_CHUNKED
ctx->writer->WriteHeader("Transfer-Encoding", "chunked");
#else
ctx->writer->WriteHeader("Content-Length", filesize);
// ctx->writer->WriteHeader("Transfer-Encoding", "chunked");
#endif
ctx->writer->EndHeaders();

char* buf = NULL;
Expand Down

0 comments on commit 1e1fbae

Please sign in to comment.