/** * @see java.lang.Object#equals(java.lang.Object) */ public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof HttpVersion)) { return false; } return equals((HttpVersion)obj); }
/** * Returns <tt>true</tt> if version 1.1 of the HTTP protocol should be * used per default, <tt>false</tt> if version 1.0 should be used. * * @return <tt>true</tt> to use HTTP/1.1, <tt>false</tt> to use 1.0 * * @deprecated Use {@link HttpMethodParams#getVersion()} */ public boolean isHttp11() { return this.params.getVersion().equals(HttpVersion.HTTP_1_1); }
/** * @see java.lang.Object#equals(java.lang.Object) */ public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof HttpVersion)) { return false; } return equals((HttpVersion)obj); }
/** * @see java.lang.Object#equals(java.lang.Object) */ public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof HttpVersion)) { return false; } return equals((HttpVersion)obj); }
/** * @see java.lang.Object#equals(java.lang.Object) */ public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof HttpVersion)) { return false; } return equals((HttpVersion)obj); }
/** * @see java.lang.Object#equals(java.lang.Object) */ public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof HttpVersion)) { return false; } return equals((HttpVersion)obj); }
/** * The HTTTP spec suggests that for HTTP 1.1 persistent connections should be used, * for HTTP 1.0 the connection should not be kept alive. This method sets up the keepAlive flag * according to the <code>version</code> that was passed in. */ protected void setupKeepAliveFromRequestVersion(HttpVersion version) { setKeepAlive(version.equals(HttpVersion.HTTP_1_1)); }
/** * Returns <tt>true</tt> if version 1.1 of the HTTP protocol should be * used per default, <tt>false</tt> if version 1.0 should be used. * * @return <tt>true</tt> to use HTTP/1.1, <tt>false</tt> to use 1.0 * * @deprecated Use {@link HttpMethodParams#getVersion()} */ @Deprecated public boolean isHttp11() { return this.params.getVersion().equals(HttpVersion.HTTP_1_1); }
/** * Returns <tt>true</tt> if version 1.1 of the HTTP protocol should be * used per default, <tt>false</tt> if version 1.0 should be used. * * @return <tt>true</tt> to use HTTP/1.1, <tt>false</tt> to use 1.0 * * @deprecated Use {@link HttpMethodParams#getVersion()} */ public boolean isHttp11() { return this.params.getVersion().equals(HttpVersion.HTTP_1_1); }
/** * Returns <tt>true</tt> if version 1.1 of the HTTP protocol should be * used per default, <tt>false</tt> if version 1.0 should be used. * * @return <tt>true</tt> to use HTTP/1.1, <tt>false</tt> to use 1.0 * * @deprecated Use {@link HttpMethodParams#getVersion()} */ public boolean isHttp11() { return this.params.getVersion().equals(HttpVersion.HTTP_1_1); }
/** * Returns <tt>true</tt> if version 1.1 of the HTTP protocol should be * used per default, <tt>false</tt> if version 1.0 should be used. * * @return <tt>true</tt> to use HTTP/1.1, <tt>false</tt> to use 1.0 * * @deprecated Use {@link HttpMethodParams#getVersion()} */ public boolean isHttp11() { return this.params.getVersion().equals(HttpVersion.HTTP_1_1); }
/** * Returns <tt>true</tt> if version 1.1 of the HTTP protocol should be * used per default, <tt>false</tt> if version 1.0 should be used. * * @return <tt>true</tt> to use HTTP/1.1, <tt>false</tt> to use 1.0 * * @deprecated Use {@link HttpMethodParams#getVersion()} */ public boolean isHttp11() { return this.params.getVersion().equals(HttpVersion.HTTP_1_1); }
private void sendExpect100(HttpRequest request) throws MuleException, IOException { RequestLine requestLine = request.getRequestLine(); // respond with status code 100, for Expect handshake // according to rfc 2616 and http 1.1 // the processing will continue and the request will be fully // read immediately after HttpVersion requestVersion = requestLine.getHttpVersion(); if (HttpVersion.HTTP_1_1.equals(requestVersion)) { Header expectHeader = request.getFirstHeader(HttpConstants.HEADER_EXPECT); if (expectHeader != null) { String expectHeaderValue = expectHeader.getValue(); if (HttpConstants.HEADER_EXPECT_CONTINUE_REQUEST_VALUE.equals(expectHeaderValue)) { HttpResponse expected = new HttpResponse(); expected.setStatusLine(requestLine.getHttpVersion(), HttpConstants.SC_CONTINUE); final DefaultMuleEvent event = new DefaultMuleEvent(new DefaultMuleMessage(expected, getEndpoint().getMuleContext()), (InboundEndpoint) endpoint, flowConstruct); RequestContext.setEvent(event); conn.writeResponse(transformResponse(expected, event)); } } } }
private void sendExpect100(HttpRequest request) throws MuleException, IOException { RequestLine requestLine = request.getRequestLine(); // respond with status code 100, for Expect handshake // according to rfc 2616 and http 1.1 // the processing will continue and the request will be fully // read immediately after HttpVersion requestVersion = requestLine.getHttpVersion(); if (HttpVersion.HTTP_1_1.equals(requestVersion)) { Header expectHeader = request.getFirstHeader(HttpConstants.HEADER_EXPECT); if (expectHeader != null) { String expectHeaderValue = expectHeader.getValue(); if (HttpConstants.HEADER_EXPECT_CONTINUE_REQUEST_VALUE.equals(expectHeaderValue)) { HttpResponse expected = new HttpResponse(); expected.setStatusLine(requestLine.getHttpVersion(), HttpConstants.SC_CONTINUE); expected.setKeepAlive(true); final DefaultMuleEvent event = new DefaultMuleEvent(new DefaultMuleMessage(expected, getMuleContext()), getInboundEndpoint(), getFlowConstruct()); RequestContext.setEvent(event); httpServerConnection.writeResponse(expected); } } } }
if (response.getHttpVersion().equals(HttpVersion.HTTP_1_0))