diff options
author | Paul Joseph Davis <davisp@apache.org> | 2009-11-16 20:42:14 +0000 |
---|---|---|
committer | Paul Joseph Davis <davisp@apache.org> | 2009-11-16 20:42:14 +0000 |
commit | 69ef80d733bdde2a0ba0bae19d2361b176d4e388 (patch) | |
tree | 678d3d557dc1874e208acadae969849d1b43745d /src/couchdb/couch_httpd_view.erl | |
parent | 14aa1c14aa1d9e1aecbd8f7ca0ebfe5b6f0e6b1e (diff) |
Fix a couple typos in the source.
paramter -> parameter
InitalBuild -> InitialBuild
Thanks David Coallier and Glenn Rempe for pointing them out.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@880951 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_httpd_view.erl')
-rw-r--r-- | src/couchdb/couch_httpd_view.erl | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/couchdb/couch_httpd_view.erl b/src/couchdb/couch_httpd_view.erl index 489df0a2..4c9902ed 100644 --- a/src/couchdb/couch_httpd_view.erl +++ b/src/couchdb/couch_httpd_view.erl @@ -376,7 +376,7 @@ validate_view_query(reduce, _, Args) -> validate_view_query(include_docs, true, Args) -> case Args#view_query_args.view_type of reduce -> - Msg = <<"Query paramter `include_docs` " + Msg = <<"Query parameter `include_docs` " "is invalid for reduce views.">>, throw({query_parse_error, Msg}); _ -> @@ -638,11 +638,14 @@ finish_reduce_fold(Req, Resp) -> end_json_response(Resp) end. -parse_bool_param("true") -> true; -parse_bool_param("false") -> false; parse_bool_param(Val) -> - Msg = io_lib:format("Invalid value for boolean paramter: ~p", [Val]), - throw({query_parse_error, ?l2b(Msg)}). + case string:to_lower(Val) of + "true" -> true; + "false" -> false; + _ -> + Msg = io_lib:format("Invalid boolean parameter: ~p", [Val]), + throw({query_parse_error, ?l2b(Msg)}) + end. parse_int_param(Val) -> case (catch list_to_integer(Val)) of |