summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Newson <rnewson@apache.org>2011-09-22 20:05:28 +0000
committerRobert Newson <rnewson@apache.org>2011-09-22 20:05:28 +0000
commit8a7696145241c4752379271c8253fa0c15093322 (patch)
tree489710bbb858a7a4eb560208218729c941829ae1
parentdc5c3520db2a1491ffeb9fec1b9c5a5a5694148e (diff)
fix port conversion in vhost
fix port conversion, don't forget to use substr function. spotted by @rnewson on irc, again. thanks. patch by benoitc. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1174358 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/couchdb/couch_httpd_vhost.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/couchdb/couch_httpd_vhost.erl b/src/couchdb/couch_httpd_vhost.erl
index a9517600..03dd02ae 100644
--- a/src/couchdb/couch_httpd_vhost.erl
+++ b/src/couchdb/couch_httpd_vhost.erl
@@ -360,8 +360,8 @@ split_host_port(HostAsString) ->
{split_host(HostAsString), '*'};
N ->
HostPart = string:substr(HostAsString, 1, N-1),
- case (catch erlang:list_to_integer(HostAsString, N+1,
- length(HostAsString))) of
+ case (catch erlang:list_to_integer(string:substr(HostAsString,
+ N+1, length(HostAsString)))) of
{'EXIT', _} ->
{split_host(HostAsString), '*'};
Port ->