Github user rnewson commented on a diff in the pull request:
https://github.com/apache/couchdb-chttpd/pull/53#discussion_r36727690
--- Diff: src/chttpd.erl ---
@@ -724,10 +794,13 @@ error_info({bad_ctype, Reason}) ->
{415, <<"bad_content_type">>, Reason};
error_info(requested_range_not_satisfiable) ->
{416, <<"requested_range_not_satisfiable">>, <<"Requested range not
satisfiable">>};
-error_info({error, illegal_database_name}) ->
- {400, <<"illegal_database_name">>, <<"Only lowercase letters (a-z), "
- "digits (0-9), and any of the characters _, $, (, ), +, -, and /
are "
- "allowed. Moreover, the database name must begin with a
letter.">>};
+error_info({error, {illegal_database_name, Name}}) when is_binary(Name) ->
+ error_info({error, {illegal_database_name, ?b2l(Name)}});
+error_info({error, {illegal_database_name, Name}}) ->
--- End diff --
Name is always binary, according to the epi PR at
https://github.com/apache/couchdb-couch/pull/81, so let's drop the list clause
and construct this as a binary.
---
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.
---