Github user iilyak commented on a diff in the pull request:
https://github.com/apache/couchdb-chttpd/pull/106#discussion_r56064788
--- Diff: src/chttpd.erl ---
@@ -1068,3 +1057,18 @@ stack_hash(Stack) ->
%% dedicated chunk.
chunked_response_buffer_size() ->
config:get_integer("httpd", "chunked_response_buffer", 1490).
+
+basic_headers(Req, Headers0) ->
+ Headers = Headers0
+ ++ server_header()
+ ++ couch_httpd_auth:cookie_auth_header(Req, Headers0),
+ chttpd_cors:headers(Req, Headers).
+
+handle_response(Req, Code, Headers, Args, Type) ->
+ couch_stats:increment_counter([couchdb, httpd_status_codes, Code]),
+ respond_(Req, Code, Headers, Args, Type).
+
+respond_(#httpd{mochi_req = MochiReq}, Code, Headers, _Args,
start_response) ->
--- End diff --
I stole it from @jaydoane
https://github.com/cloudant/couchdb-couch/pull/10/files#diff-667bf0ed30e8a6b8ef281fa934cb9c06R718
:-) . I saw this convention in another project which I cannot recall.
In various erlang projects I saw conventions like:
- respond_
- respond0
- respond_int
- respond_1
- respond_priv
I really dislike things with number. So the choices left are `respond_int`,
`respond_priv` and `respond_`. I would choose the last one.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---