void respondMoved(String location) { responseCode = HTTP_MOVED_PERM; responseMsg = "Moved Permanently"; String strLoc = location; if (strLoc.startsWith("/apps")) strLoc = strLoc.substring(5); String strQuery = uri.getQueryString(); if (strQuery != null && strQuery.length() > 0) strLoc += "?" + strQuery; resHeaders.addProperty("Location", strLoc); contentLength = 0; responseData = new ByteArrayInputStream("".getBytes()); }
void doDispatch(Properties reqHash, String strIndex) throws IOException { reqHash.setProperty("request-method", this.method); reqHash.setProperty("request-uri", uri.getPath()); reqHash.setProperty("request-query", uri.getQueryString()); if (postData != null && postData.size() > 0) { if (!RHOCONF().getBool("log_skip_post")) LOG.TRACE(postData.toString()); reqHash.setProperty("request-body", postData.toString()); } RubyValue res = RhoRuby.processRequest(reqHash, reqHeaders, resHeaders, strIndex); processResponse(res); RhodesApp.getInstance().keepLastVisitedUrl(url_external); LOG.INFO("dispatch end"); }
public String getQuery() { LOG.TRACE("getQuery: " + uri.getQueryString()); return uri.getQueryString(); }