diff options
author | Damien F. Katz <damien@apache.org> | 2009-10-27 21:40:25 +0000 |
---|---|---|
committer | Damien F. Katz <damien@apache.org> | 2009-10-27 21:40:25 +0000 |
commit | cbd893d573e2b37baa50528f2d4a639f885ebefa (patch) | |
tree | 684c60c516e3a91d3e0da949c2d1496eadb7921b /src/couchdb/couch_httpd_misc_handlers.erl | |
parent | 8fbe7fa7b6ad515c456e21ba41d55dccd52ac3c6 (diff) |
Make it harder to accidently terminate chunked resposnes by requiring callers to explicity call last_chunk(Req) and ignoring send_chunk calls with no data.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@830353 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_httpd_misc_handlers.erl')
-rw-r--r-- | src/couchdb/couch_httpd_misc_handlers.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/couchdb/couch_httpd_misc_handlers.erl b/src/couchdb/couch_httpd_misc_handlers.erl index 7e2d9ea2..fb761f5b 100644 --- a/src/couchdb/couch_httpd_misc_handlers.erl +++ b/src/couchdb/couch_httpd_misc_handlers.erl @@ -24,7 +24,7 @@ -import(couch_httpd, [send_json/2,send_json/3,send_json/4,send_method_not_allowed/2, - start_json_response/2,send_chunk/2,end_json_response/1, + start_json_response/2,send_chunk/2,last_chunk/1,end_json_response/1, start_chunked_response/3, send_error/4]). % httpd global handlers @@ -203,7 +203,7 @@ handle_log_req(#httpd{method='GET'}=Req) -> {"Content-Length", integer_to_list(length(Chunk))} ]), send_chunk(Resp, Chunk), - send_chunk(Resp, ""); + last_chunk(Resp); handle_log_req(Req) -> send_method_not_allowed(Req, "GET"). |