final HttpTransactionContext httpTransactionContext, final FilterChainContext ctx) { final String redirectURL = responsePacket.getHeader(Header.Location); if (redirectURL == null) { throw new IllegalStateException("redirect received, but no location header was present");
private static WebSocketResponse getWebSocketResponse(HttpResponsePacket httpResponsePacket) { WebSocketResponse webSocketResponse = new WebSocketResponse(); for (String name : httpResponsePacket.getHeaders().names()) { webSocketResponse.getHeaders().put(name, httpResponsePacket.getHeader(name)); } webSocketResponse.setStatus(httpResponsePacket.getStatus()); return webSocketResponse; }
/** * Return the value for the specified header, or <code>null</code> if this * header has not been set. If more than one value was added for this * name, only the first is returned; use getHeaderValues() to retrieve all * of them. * * @param name Header name to look up */ public String getHeader(String name) { checkResponse(); return response.getHeader(name); }
/** * Return the value for the specified header, or <code>null</code> if this * header has not been set. If more than one value was added for this * name, only the first is returned; use getHeaderValues() to retrieve all * of them. * * @param name Header name to look up */ public String getHeader(String name) { checkResponse(); return response.getHeader(name); }
/** * Return the value for the specified header, or <code>null</code> if this * header has not been set. If more than one value was added for this * name, only the first is returned; use getHeaderValues() to retrieve all * of them. * * @param name Header name to look up */ public String getHeader(String name) { checkResponse(); return response.getHeader(name); }
/** * Return the value for the specified header, or <code>null</code> if this * header has not been set. If more than one value was added for this * name, only the first is returned; use getHeaderValues() to retrieve all * of them. * * @param name Header name to look up */ public String getHeader(String name) { checkResponse(); return response.getHeader(name); }
/** * Return the value for the specified header, or <code>null</code> if this * header has not been set. If more than one value was added for this * name, only the first is returned; use getHeaderValues() to retrieve all * of them. * * @param name Header name to look up */ public String getHeader(String name) { checkResponse(); return response.getHeader(name); }
/** * Return the value for the specified header, or <code>null</code> if this * header has not been set. If more than one value was added for this * name, only the first is returned; use getHeaderValues() to retrieve all * of them. * * @param name Header name to look up */ public String getHeader(String name) { checkResponse(); return response.getHeader(name); }
/** * Return the value for the specified header, or <code>null</code> if this * header has not been set. If more than one value was added for this * name, only the first is returned; use getHeaderValues() to retrieve all * of them. * * @param name Header name to look up */ public String getHeader(String name) { checkResponse(); return response.getHeader(name); }
/** * Return the value for the specified header, or <code>null</code> if this * header has not been set. If more than one value was added for this * name, only the first is returned; use getHeaderValues() to retrieve all * of them. * * @param name Header name to look up */ public String getHeader(String name) { checkResponse(); return response.getHeader(name); }
/** * Return the value for the specified header, or <code>null</code> if this * header has not been set. If more than one value was added for this * name, only the first is returned; use getHeaderValues() to retrieve all * of them. * * @param name Header name to look up */ public String getHeader(String name) { checkResponse(); return response.getHeader(name); }
/** * Return the value for the specified header, or <code>null</code> if this * header has not been set. If more than one value was added for this * name, only the first is returned; use getHeaderValues() to retrieve all * of them. * * @param name Header name to look up */ public String getHeader(String name) { checkResponse(); return response.getHeader(name); }
/** * Return the value for the specified header, or <code>null</code> if this * header has not been set. If more than one value was added for this * name, only the first is returned; use getHeaderValues() to retrieve all * of them. * * @param name Header name to look up */ public String getHeader(String name) { checkResponse(); return response.getHeader(name); }
@Override public void validateServerResponse(final HttpResponsePacket headers) throws HandshakeException { super.validateServerResponse(headers); secKey.validateServerKey(headers.getHeader(Constants.SEC_WS_ACCEPT)); }
@Override public void validateServerResponse(final HttpResponsePacket headers) throws HandshakeException { super.validateServerResponse(headers); secKey.validateServerKey(headers.getHeader(Constants.SEC_WS_ACCEPT)); }
@Override public void validateServerResponse(final HttpResponsePacket headers) throws HandshakeException { super.validateServerResponse(headers); secKey.validateServerKey(headers.getHeader(Constants.SEC_WS_ACCEPT)); }
@Override public void validateServerResponse(final HttpResponsePacket headers) throws HandshakeException { super.validateServerResponse(headers); secKey.validateServerKey(headers.getHeader(Constants.SEC_WS_ACCEPT)); }
@Override public void validateServerResponse(final HttpResponsePacket headers) throws HandshakeException { super.validateServerResponse(headers); secKey.validateServerKey(headers.getHeader(Constants.SEC_WS_ACCEPT)); }
@Override public void validateServerResponse(final HttpResponsePacket headers) throws HandshakeException { super.validateServerResponse(headers); secKey.validateServerKey(headers.getHeader(Constants.SEC_WS_ACCEPT)); }
protected HttpResponsePacket buildHttpResponsePacket(HttpRequestPacket sourceRequest, HttpResponse httpResponse) { final HttpResponsePacket.Builder responsePacketBuilder = HttpResponsePacket.builder(sourceRequest) .status(httpResponse.getStatusCode()) .reasonPhrase(httpResponse.getReasonPhrase()); final Collection<String> allHeaders = httpResponse.getHeaderNames(); for (String headerName : allHeaders) { final Collection<String> values = httpResponse.getHeaderValues(headerName); for (String value : values) { responsePacketBuilder.header(headerName, value); } } HttpResponsePacket httpResponsePacket = responsePacketBuilder.build(); httpResponsePacket.setProtocol(sourceRequest.getProtocol()); if (httpResponse.getHeaderValueIgnoreCase(TRANSFER_ENCODING) != null) { httpResponsePacket.setChunked(true); } if (CLOSE.equalsIgnoreCase(httpResponsePacket.getHeader(CONNECTION))) { httpResponsePacket.getProcessingState().setKeepAlive(false); } return httpResponsePacket; }