couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iil...@apache.org
Subject [23/50] couch-httpd commit: updated refs/heads/split_out_httpd_stack to e44a372
Date Tue, 01 Mar 2016 20:00:56 GMT
Merge the diff for send_chunked_error/2


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-httpd/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-httpd/commit/7f7ff5a4
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-httpd/tree/7f7ff5a4
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-httpd/diff/7f7ff5a4

Branch: refs/heads/split_out_httpd_stack
Commit: 7f7ff5a48e4b909c8020e38251ff167cb0471968
Parents: 680639e
Author: ILYA Khlopotov <iilyak@ca.ibm.com>
Authored: Fri Feb 26 10:14:45 2016 -0800
Committer: ILYA Khlopotov <iilyak@ca.ibm.com>
Committed: Tue Mar 1 08:35:08 2016 -0800

----------------------------------------------------------------------
 src/couch_httpd_original.erl | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-httpd/blob/7f7ff5a4/src/couch_httpd_original.erl
----------------------------------------------------------------------
diff --git a/src/couch_httpd_original.erl b/src/couch_httpd_original.erl
index f0a9dbf..d879fb8 100644
--- a/src/couch_httpd_original.erl
+++ b/src/couch_httpd_original.erl
@@ -19,7 +19,6 @@
 -export([make_fun_spec_strs/1]).
 
 
--export([send_chunked_error/2]).
 -export([handle_request_int/5]).
 
 
@@ -75,7 +74,8 @@
     verify_is_server_admin/1,
     error_info/1,
     send_error/2,
-    send_error/4
+    send_error/4,
+    send_chunked_error/2
 ]).
 
 -define(HANDLER_NAME_IN_MODULE_POS, 6).
@@ -416,13 +416,6 @@ increment_method_stats(Method) ->
 
 % Utilities
 
-send_chunked_error(Resp, Error) ->
-    {Code, ErrorStr, ReasonStr} = error_info(Error),
-    JsonError = {[{<<"code">>, Code},
-        {<<"error">>,  ErrorStr},
-        {<<"reason">>, ReasonStr}]},
-    send_chunk(Resp, ?l2b([$\n,?JSON_ENCODE(JsonError),$\n])),
-    last_chunk(Resp).
 
 
 


Mime
View raw message