You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by wo...@apache.org on 2020/01/29 17:03:29 UTC

[couchdb] 01/01: Fix node-specific shard access via HTTP

This is an automated email from the ASF dual-hosted git repository.

wohali pushed a commit to branch fix-shard-access
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 0bebd77d4dbbbec44719cddda8f01805c4f9ee00
Author: Joan Touzet <jo...@atypical.net>
AuthorDate: Wed Jan 29 12:03:06 2020 -0500

    Fix node-specific shard access via HTTP
---
 src/chttpd/src/chttpd_node.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/chttpd/src/chttpd_node.erl b/src/chttpd/src/chttpd_node.erl
index acd5aff..499eb16 100644
--- a/src/chttpd/src/chttpd_node.erl
+++ b/src/chttpd/src/chttpd_node.erl
@@ -132,7 +132,7 @@ handle_node_req(#httpd{path_parts=[_, Node | PathParts],
     % strip /_node/{node} from Req0 before descending further
     RawUri = MochiReq0:get(raw_path),
     {_, Query, Fragment} = mochiweb_util:urlsplit_path(RawUri),
-    NewPath0 = "/" ++ lists:join("/", [?b2l(P) || P <- PathParts]),
+    NewPath0 = "/" ++ lists:join("/", [couch_util:url_encode(P) || P <- PathParts]),
     NewRawPath = mochiweb_util:urlunsplit_path({NewPath0, Query, Fragment}),
     MaxSize =  config:get_integer("httpd", "max_http_request_size", 4294967296),
     NewOpts = [{body, MochiReq0:recv_body(MaxSize)} | MochiReq0:get(opts)],