iilyak commented on a change in pull request #3568:
URL: https://github.com/apache/couchdb/pull/3568#discussion_r635231003
##########
File path: src/couch/src/couch_httpd_vhost.erl
##########
@@ -295,15 +331,21 @@ parse_vhost(Vhost) ->
{H1, P, string:tokens(Path, "/")}
end.
-
split_host_port(HostAsString) ->
case string:rchr(HostAsString, $:) of
0 ->
{split_host(HostAsString), '*'};
N ->
- HostPart = string:substr(HostAsString, 1, N-1),
- case (catch erlang:list_to_integer(string:substr(HostAsString,
- N+1, length(HostAsString)))) of
+ HostPart = string:substr(HostAsString, 1, N - 1),
+ case
+ (catch erlang:list_to_integer(
Review comment:
I think we should eventually refactor this to use a variable.
```
HostPart = string:substr(HostAsString, 1, N - 1),
PortStr = string:substr(HostAsString, N+1, length(HostAsString)),
case (catch erlang:list_to_integer(PortStr)) of
{'EXIT', _} ->
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]