Skip to content
Browse files

Patch from sendtopms which fixes parse_element/2 for server_port in e…

…wgi_mochiweb
  • Loading branch information...
1 parent f17f948 commit f87efc455219f33a1ceaec55f563b0778ea1a1e8 @hntrmrrs hntrmrrs committed Nov 13, 2009
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/server_gateways/ewgi_mochiweb.erl
View
7 src/server_gateways/ewgi_mochiweb.erl
@@ -295,9 +295,10 @@ parse_element(server_name, Req) ->
end;
parse_element(server_port, Req) ->
- HostPort = Req:get_header_value(host),
- case HostPort of
- HostPort when is_list(HostPort) ->
+ HostPort0 = Req:get_header_value(host),
+ case HostPort0 of
+ HostPort0 when is_list(HostPort0) ->
+ HostPort = string:tokens(HostPort0, ":"),
case length(HostPort) of
2 -> lists:nth(2, HostPort);
_ -> undefined

0 comments on commit f87efc4

Please sign in to comment.
Something went wrong with that request. Please try again.