Changeset 1614 for trunk/autoquest-httpmonitor/src/main/java/de/ugoe/cs/autoquest/httpmonitor/proxy/HttpMonitoringProxyServlet.java
- Timestamp:
- 07/15/14 13:45:31 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-httpmonitor/src/main/java/de/ugoe/cs/autoquest/httpmonitor/proxy/HttpMonitoringProxyServlet.java
r1567 r1614 19 19 import java.net.URI; 20 20 import java.net.URISyntaxException; 21 import java.net.URLDecoder; 21 22 import java.net.URLEncoder; 22 23 import java.nio.ByteBuffer; … … 99 100 protected URI rewriteURI(HttpServletRequest request) { 100 101 try { 102 String query = request.getQueryString(); 103 104 if (query != null) { 105 query = URLDecoder.decode(query, "UTF-8"); 106 } 107 101 108 return new URI(request.getScheme(), null, proxiedServer, proxiedPort, 102 request.getPathInfo(), request.getQueryString(), null);109 request.getPathInfo(), query, null); 103 110 } 104 111 catch (URISyntaxException e) { 112 Console.printerrln("could not rewrite URI: " + e); 113 Console.logException(e); 114 return null; 115 } 116 catch (UnsupportedEncodingException e) { 105 117 Console.printerrln("could not rewrite URI: " + e); 106 118 Console.logException(e); … … 365 377 } 366 378 } 367 return result.toString(); 379 380 if (result.length() <= 0) { 381 return null; 382 } 383 else { 384 return result.toString(); 385 } 368 386 } 369 387
Note: See TracChangeset
for help on using the changeset viewer.