/** Construct connection using URI * */ public RhoConnection(URI _uri) { url_external = _uri.toString(); uri_orig = _uri; uri = new URI(url_external); if (!uri.getPath().startsWith("/apps")) uri.setPath("/apps" + uri.getPath()); else uri.setPath(uri.getPath()); }
public void resetUrl(String url) { url_external = url; uri = new URI(url_external); if (!uri.getPath().startsWith("/apps")) uri.setPath("/apps" + uri.getPath()); else uri.setPath(uri.getPath()); method = ""; responseCode = 200; responseMsg = "OK"; contentLength = -1; reqHeaders.clear(); resHeaders.clear(); requestProcessed = false; try { clean(); } catch (IOException exc) { LOG.ERROR("clean failed.", exc); } }