couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject [1/3] chttpd commit: updated refs/heads/master to 7a2bd8f
Date Thu, 22 Oct 2015 18:52:30 GMT
Repository: couchdb-chttpd
Updated Branches:
  refs/heads/master 548220901 -> 7a2bd8f31


Use real chttpd port for URI construct

Those port that we get from config works fine until we start to ask
for a random port.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/commit/bf604a5e
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/tree/bf604a5e
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/diff/bf604a5e

Branch: refs/heads/master
Commit: bf604a5ea092d3b90ba4fed8483c000d68d0130f
Parents: 5482209
Author: Alexander Shorin <kxepal@apache.org>
Authored: Tue Oct 20 21:04:31 2015 +0300
Committer: Alexander Shorin <kxepal@apache.org>
Committed: Tue Oct 20 21:04:31 2015 +0300

----------------------------------------------------------------------
 src/chttpd.erl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-chttpd/blob/bf604a5e/src/chttpd.erl
----------------------------------------------------------------------
diff --git a/src/chttpd.erl b/src/chttpd.erl
index cbbebd0..b861ea9 100644
--- a/src/chttpd.erl
+++ b/src/chttpd.erl
@@ -402,8 +402,9 @@ is_http(_) ->
     false.
 
 make_uri(Req, Raw) ->
+    Port = integer_to_list(mochiweb_socket_server:get(chttpd, port)),
     Url = list_to_binary(["http://", config:get("httpd", "bind_address"),
-                         ":", config:get("chttpd", "port"), "/", Raw]),
+                          ":", Port, "/", Raw]),
     Headers = [
         {<<"authorization">>, ?l2b(header_value(Req,"authorization",""))},
         {<<"cookie">>, ?l2b(extract_cookie(Req))}


Mime
View raw message