@Override public FluentCaseInsensitiveStringsMap getHeaders() { if (!initialized) { synchronized (headers) { if (!initialized) { initialized = true; final MimeHeaders headersLocal = response.getHeaders(); for (int i = 0; i < headersLocal.size(); i++) { headers.add(headersLocal.getName(i).toString(Charsets.ASCII_CHARSET), headersLocal.getValue(i).toString(Charsets.ASCII_CHARSET)); } } } } return headers; }
/** * @return the "Upgrade" header value. */ public final String getUpgrade() { return upgrade.toString(); }
@Override public void mapName(final DataChunk name, final MappingData mappingData) { final String nameStr = name.toString(); final HttpHandler handler = handlersByName.get(nameStr); if (handler != null) { mappingData.wrapper = handler; mappingData.servletName = nameStr; } } }
@Override public void mapName(final DataChunk name, final MappingData mappingData) { final String nameStr = name.toString(); final HttpHandler handler = handlersByName.get(nameStr); if (handler != null) { mappingData.wrapper = handler; mappingData.servletName = nameStr; } } }
/** * Return the authentication type used for this Request. */ public String getAuthType() { return request.authType().toString(); }
/** * Utility method to update {@link Request} path values. * * @param request * @param mappingData */ protected static void updatePaths(final Request request, final MappingData mappingData) { request.setContextPath(mappingData.contextPath.toString()); request.setPathInfo(mappingData.pathInfo.toString()); request.setHttpHandlerPath(mappingData.wrapperPath.toString()); }
/** * Return the server name responding to this Request. */ public String getServerName() { return request.serverName().toString(); }
public String getDecodedURI(final boolean isSlashAllowed, Charset encoding) throws CharConversionException { getDecodedRequestURIBC(isSlashAllowed, encoding); return decodedRequestURIDC.toString(); }
/** * Utility method to update {@link Request} path values. * * @param request * @param mappingData */ protected static void updatePaths(final Request request, final MappingData mappingData) { request.setContextPath(mappingData.contextPath.toString()); request.setPathInfo(mappingData.pathInfo.toString()); request.setHttpHandlerPath(mappingData.wrapperPath.toString()); }
/** * Returns the query string that is contained in the request URL after the * path. This method returns null if the URL does not have a query string. * * @return the query string that is contained in the request URL after the * path. This method returns null if the URL does not have a query string. */ public String getQueryString() { return ((queryC.isNull()) ? null : queryC.toString()); }
/** * Returns the query string that is contained in the request URL after the * path. This method returns null if the URL does not have a query string. * * @return the query string that is contained in the request URL after the * path. This method returns null if the URL does not have a query string. */ public String getQueryString() { return ((queryC.isNull()) ? null : queryC.toString()); }
/** * @return the Internet Protocol (IP) address of the client or last proxy * that sent the request. */ public String getRemoteAddress() { return remoteAddr().toString(); }
/** * @return a <code>String</code> representing the fully qualified name of * the client or the last proxy that sent the request. If the engine cannot * or chooses not to resolve the hostname (to improve performance), this * method returns the the IP address. */ public String getRemoteHost() { return remoteHost().toString(); }
/** * @return the query string associated with this request. */ public String getQueryString() { final String queryString = request.getQueryStringDC().toString( parameters.getQueryStringEncoding()); return queryString == null || queryString.isEmpty() ? null : queryString; }
/** * @return the query string associated with this request. */ public String getQueryString() { final String queryString = request.getQueryStringDC().toString( parameters.getQueryStringEncoding()); return queryString == null || queryString.isEmpty() ? null : queryString; }
/** * Get the HTTP message protocol version. The result format is "HTTP/1.x". * * @return the HTTP message protocol version. The result format is "HTTP/1.x". */ public String getProtocolString() { if (parsedProtocol == null) { return getProtocolDC().toString(); } return parsedProtocol.getProtocolString(); }
private static int setStringAttributeValue(final AjpHttpRequest req, final String key, final Buffer buffer, int offset) { final DataChunk tmpDataChunk = req.tmpDataChunk; offset = getBytesToDataChunk(buffer, offset, tmpDataChunk); final String value = tmpDataChunk.toString(); tmpDataChunk.recycle(); req.setAttribute(key, value); return offset; }
private void parseContentTypeHeader() { contentTypeParsed = true; if (!contentType.isSet()) { final DataChunk dc = headers.getValue(Header.ContentType); if (dc != null && !dc.isNull()) { setContentType(dc.toString()); } } }
private void parseContentTypeHeader() { contentTypeParsed = true; if (!contentType.isSet()) { final DataChunk dc = headers.getValue(Header.ContentType); if (dc != null && !dc.isNull()) { setContentType(dc.toString()); } } }