80 |
protected HTTPResponse doGet(HTTPRequest req, |
protected HTTPResponse doGet(HTTPRequest req, |
81 |
HTTPResponse.Factory resf) throws IOException { |
HTTPResponse.Factory resf) throws IOException { |
82 |
try { |
try { |
83 |
|
boolean rewrite = false, backlinks = false; |
84 |
String uri = req.getRequestURI(); |
String uri = req.getRequestURI(); if(HTTPProxy.dbg) p("<"+port+"> GET: "+uri + " (" + this.getRemoteIPAddress() + ")"); |
85 |
if(HTTPProxy.dbg) p("<"+port+"> GET: "+uri + " (" + this.getRemoteIPAddress() + ")"); |
|
86 |
|
/* URN proxy requests start directly with "urn:" */ |
87 |
if(uri.startsWith("/")) uri = uri.substring(1); |
if(uri.startsWith("/")) uri = uri.substring(1); |
88 |
|
|
89 |
boolean rewrite = false, backlinks = false; |
if(uri.equals(URNPAC)) { |
90 |
|
return makePAC(req, resf); |
91 |
|
} |
92 |
|
|
93 |
if(uri.startsWith("rewrite/")) { |
if(uri.startsWith("rewrite/")) { |
94 |
uri = uri.substring("rewrite/".length()); |
uri = uri.substring("rewrite/".length()); |
95 |
rewrite = true; |
rewrite = true; |
|
} else if(uri.equals(URNPAC)) { |
|
|
return makePAC(req, resf); |
|
96 |
} |
} |
97 |
|
|
98 |
if(uri.startsWith("backlinks/")) { |
if(uri.startsWith("backlinks/")) { |