Skip to content

Commit 994c45f

Browse files
committed
In order to request content, we need an absolute URI. If the input URI is protocol-relative, use "http".
1 parent 8b9e91e commit 994c45f

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Tools/proxy/proxy.jar

154 Bytes
Binary file not shown.

Tools/proxy/src/com/agi/ProxyHandler.java

+4
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ public void handle(String target, Request baseRequest, final HttpServletRequest
6969
URI uri;
7070
try {
7171
uri = new URI((String) parameterNames.nextElement());
72+
73+
if (uri.getScheme() == null) {
74+
uri = new URI("http", uri.getUserInfo(), uri.getHost(), uri.getPort(), uri.getPath(), uri.getQuery(), uri.getFragment());
75+
}
7276
} catch (Exception e) {
7377
throw new ServletException(e);
7478
}

0 commit comments

Comments
 (0)