/** * Returns the full protocol version text such as {@code "HTTP/1.0"}. */ @Override public String toString() { return getText(); }
@Override public String toString() { StringBuilder buf = new StringBuilder(); buf.append(getClass().getSimpleName()); buf.append("(version: "); buf.append(getProtocolVersion().getText()); buf.append(", keepAlive: "); buf.append(HttpHeaders.isKeepAlive(this)); buf.append(", chunked: "); buf.append(isChunked()); buf.append(')'); buf.append(StringUtil.NEWLINE); appendHeaders(buf); // Remove the last newline. buf.setLength(buf.length() - StringUtil.NEWLINE.length()); return buf.toString(); }
@Override public String toString() { StringBuilder buf = new StringBuilder(); buf.append(getClass().getSimpleName()); buf.append("(chunked: "); buf.append(isChunked()); buf.append(')'); buf.append(StringUtil.NEWLINE); buf.append(getProtocolVersion().getText()); buf.append(' '); buf.append(getStatus().toString()); buf.append(StringUtil.NEWLINE); appendHeaders(buf); // Remove the last newline. buf.setLength(buf.length() - StringUtil.NEWLINE.length()); return buf.toString(); } }
/** * Sets the HTTP version header. */ public static void setVersion(int spdyVersion, SpdyHeadersFrame frame, HttpVersion httpVersion) { frame.headers().set(HttpNames.VERSION, httpVersion.getText()); }
@Override public String toString() { StringBuilder buf = new StringBuilder(); buf.append(getClass().getSimpleName()); buf.append("(chunked: "); buf.append(isChunked()); buf.append(')'); buf.append(StringUtil.NEWLINE); buf.append(getMethod().toString()); buf.append(' '); buf.append(getUri()); buf.append(' '); buf.append(getProtocolVersion().getText()); buf.append(StringUtil.NEWLINE); appendHeaders(buf); // Remove the last newline. buf.setLength(buf.length() - StringUtil.NEWLINE.length()); return buf.toString(); } }
@Override public String getProtocolText() { return response.getProtocolVersion().getText(); }
@Override public String getProtocolText() { return response.getProtocolVersion().getText(); }
@Override public String getProtocolText() { return response.getProtocolVersion().getText(); }
@Override public String getProtocolText() { return response.getProtocolVersion().getText(); }
@Override public boolean decode(Channel channel) throws Exception { HttpChannelConfig httpConfig = (HttpChannelConfig) channel.getConfig(); HttpVersion version = httpConfig.getVersion(); ChannelBuffer buffer = copiedBuffer(version.getText(), UTF_8); versionDecoder.decode(buffer); return true; }