/** * 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()); }
private static int indexOf(String[] aliases, DataChunk dc) { if (dc == null || dc.isNull()) { return -1; } for (int i = 0; i < aliases.length; i++) { final String alias = aliases[i]; if (dc.indexOf(alias, 0) != -1) { return i; } } return -1; }
public boolean equals(final DataChunk protocolC) { return protocolC != null && !protocolC.isNull() && protocolC.equals(protocolBytes); } }
public boolean equals(final DataChunk protocolC) { return protocolC != null && !protocolC.isNull() && protocolC.equals(protocolBytes); } }
/** * @return a {@link DataChunk} representing the Internet Protocol (IP) * address of the interface on which the request was received. */ public DataChunk localAddr() { if (localAddressC.isNull()) { InetAddress inetAddr = ((InetSocketAddress) connection .getLocalAddress()).getAddress(); localAddressC.setString(inetAddr.getHostAddress()); } return localAddressC; }
/** * @return the {@link DataChunk} representing the Internet Protocol (IP) * address of the client or last proxy that sent the request. */ public DataChunk remoteAddr() { if (remoteAddressC.isNull()) { remoteAddressC .setString(((InetSocketAddress) connection.getPeerAddress()) .getAddress().getHostAddress()); } return remoteAddressC; }
/** * @return the {@link DataChunk} representing the Internet Protocol (IP) * address of the client or last proxy that sent the request. */ public DataChunk remoteAddr() { if (remoteAddressC.isNull()) { remoteAddressC .setString(((InetSocketAddress) connection.getPeerAddress()) .getAddress().getHostAddress()); } return remoteAddressC; }
/** * @return the {@link DataChunk} representing the Internet Protocol (IP) * address of the client or last proxy that sent the request. */ public DataChunk remoteAddr() { if (remoteAddressC.isNull()) { remoteAddressC .setString(((InetSocketAddress) connection.getPeerAddress()) .getAddress().getHostAddress()); } return remoteAddressC; }
/** * @return a {@link DataChunk} representing the Internet Protocol (IP) * address of the interface on which the request was received. */ public DataChunk localAddr() { if (localAddressC.isNull()) { InetAddress inetAddr = ((InetSocketAddress) connection .getLocalAddress()).getAddress(); localAddressC.setString(inetAddr.getHostAddress()); } return localAddressC; }
/** * @return a {@link DataChunk} representing the host name of the * Internet Protocol (IP) interface on which the request was received. */ public DataChunk localName() { if (localNameC.isNull()) { InetAddress inetAddr = ((InetSocketAddress) connection .getLocalAddress()).getAddress(); localNameC.setString(inetAddr.getHostName()); } return localNameC; }
protected boolean isHttp2UpgradingVersion( final HttpHeader httpHeader) { final DataChunk upgradeDC= httpHeader.getUpgradeDC(); assert upgradeDC != null && !upgradeDC.isNull(); // should've been check before // Check "Upgrade: h2c" header return upgradeDC.equals(HTTP2_CLEAR); }
/** * Propagate the "Upgrade" value to headers. */ protected void makeUpgradeHeader() { if (!upgrade.isNull()) { headers.setValue(Header.Upgrade).set(upgrade); } }
/** * Propagate the "Upgrade" value to headers. */ protected void makeUpgradeHeader() { if (!upgrade.isNull()) { headers.setValue(Header.Upgrade).set(upgrade); } }
protected boolean isHttp2UpgradingVersion( final HttpHeader httpHeader) { final DataChunk upgradeDC= httpHeader.getUpgradeDC(); assert upgradeDC != null && !upgradeDC.isNull(); // should've been check before // Check "Upgrade: h2c" header return upgradeDC.equals(HTTP2_CLEAR); }
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()); } } }
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()); } } }
private void parseContentTypeHeader() { contentTypeParsed = true; if (!contentType.isSet()) { final DataChunk dc = headers.getValue(Header.ContentType); if (dc != null && !dc.isNull()) { setContentType(dc.toString()); } } }