Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ public class RestProtocol extends AbstractProxyProtocol {

private static final int DEFAULT_PORT = 80;

private static final String HTTP_PROTOCOL = "protocol";

private static final String DEFAULT_HTTP_PROTOCOL = "http";

private final Map<String, RestServer> servers = new ConcurrentHashMap<String, RestServer>();

private final RestServerFactory serverFactory = new RestServerFactory();
Expand Down Expand Up @@ -184,9 +188,9 @@ public long getKeepAliveDuration(HttpResponse response, HttpContext context) {

ResteasyWebTarget target;
if(url.getPort() == 0){
target = client.target(url.getProtocol() + "://" + url.getHost() + "/" + getContextPath(url));
target = client.target(url.getParameter(HTTP_PROTOCOL,DEFAULT_HTTP_PROTOCOL) + "://" + url.getHost() + "/" + getContextPath(url));
} else {
target = client.target(url.getProtocol() + "://" + url.getHost() + ":" + url.getPort() + "/" + getContextPath(url));
target = client.target(url.getParameter(HTTP_PROTOCOL,DEFAULT_HTTP_PROTOCOL) + "://" + url.getHost() + ":" + url.getPort() + "/" + getContextPath(url));
}
return target.proxy(serviceType);
}
Expand Down