Merge pull request #663 from vijaykiran/issue-953

Fix port number in the parseauthentication
This commit is contained in:
Adrian Cole 2012-06-05 09:40:03 -07:00
commit f2bec6c353
1 changed files with 5 additions and 1 deletions

View File

@ -89,7 +89,11 @@ public class ParseAuthenticationResponseFromHeaders implements Function<HttpResp
@Override
public ParseAuthenticationResponseFromHeaders setContext(HttpRequest request) {
return setHostToReplace(request.getEndpoint().getHost());
String host = request.getEndpoint().getHost();
if (request.getEndpoint().getPort() != -1) {
host += ":" + request.getEndpoint().getPort();
}
return setHostToReplace(host);
}
@VisibleForTesting