couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From beno...@apache.org
Subject svn commit: r1086017 - /couchdb/trunk/src/couchdb/couch_httpd_vhost.erl
Date Sun, 27 Mar 2011 20:11:53 GMT
Author: benoitc
Date: Sun Mar 27 20:11:53 2011
New Revision: 1086017

URL: http://svn.apache.org/viewvc?rev=1086017&view=rev
Log:
fix port conversion, don't forget to use substr function. spotted by
@rnewson on irc, again. thanks

Modified:
    couchdb/trunk/src/couchdb/couch_httpd_vhost.erl

Modified: couchdb/trunk/src/couchdb/couch_httpd_vhost.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_httpd_vhost.erl?rev=1086017&r1=1086016&r2=1086017&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_httpd_vhost.erl (original)
+++ couchdb/trunk/src/couchdb/couch_httpd_vhost.erl Sun Mar 27 20:11:53 2011
@@ -264,8 +264,8 @@ split_host_port(HostAsString) ->
             {split_host(HostAsString), 80};
         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), 80};
                 Port ->



Mime
View raw message