/** * Returns the HTTP protocol version to be used for this request. * * @see BasicHttpRequest#BasicHttpRequest(String, String) */ public ProtocolVersion getProtocolVersion() { return getRequestLine().getProtocolVersion(); }
public ProtocolVersion getProtocolVersion() { if (this.requestline != null) { return this.requestline.getProtocolVersion(); } else { return HttpProtocolParams.getVersion(getParams()); } }
public void process(final HttpRequest request, final HttpContext context) throws HttpException, IOException { if (request == null) { throw new IllegalArgumentException("HTTP request may not be null"); } if (request instanceof HttpEntityEnclosingRequest) { HttpEntity entity = ((HttpEntityEnclosingRequest)request).getEntity(); // Do not send the expect header if request body is known to be empty if (entity != null && entity.getContentLength() != 0) { ProtocolVersion ver = request.getRequestLine().getProtocolVersion(); if (HttpProtocolParams.useExpectContinue(request.getParams()) && !ver.lessEquals(HttpVersion.HTTP_1_0)) { request.addHeader(HTTP.EXPECT_DIRECTIVE, HTTP.EXPECT_CONTINUE); } } } }
ProtocolVersion ver = request.getRequestLine().getProtocolVersion(); if (ver.lessEquals(HttpVersion.HTTP_1_0)) { return;
/** * Actually formats a request line. * Called from {@link #formatRequestLine}. * * @param buffer the empty buffer into which to format, * never <code>null</code> * @param reqline the request line to format, never <code>null</code> */ protected void doFormatRequestLine(final CharArrayBuffer buffer, final RequestLine reqline) { final String method = reqline.getMethod(); final String uri = reqline.getUri(); // room for "GET /index.html HTTP/1.1" int len = method.length() + 1 + uri.length() + 1 + estimateProtocolVersionLen(reqline.getProtocolVersion()); buffer.ensureCapacity(len); buffer.append(method); buffer.append(' '); buffer.append(uri); buffer.append(' '); appendProtocolVersion(buffer, reqline.getProtocolVersion()); }
throw new ProtocolException("Content-Length header already present"); ProtocolVersion ver = request.getRequestLine().getProtocolVersion(); HttpEntity entity = ((HttpEntityEnclosingRequest)request).getEntity(); if (entity == null) {
request.getRequestLine().getProtocolVersion(); if (((HttpEntityEnclosingRequest) request).expectContinue() && !ver.lessEquals(HttpVersion.HTTP_1_0)) {
request.getRequestLine().getProtocolVersion(); if (!ver.lessEquals(HttpVersion.HTTP_1_1)) {
/** * Returns the HTTP protocol version to be used for this request. * * @see #BasicHttpRequest(String, String) */ @Override public ProtocolVersion getProtocolVersion() { return getRequestLine().getProtocolVersion(); }
/** * Returns the HTTP protocol version to be used for this request. * * @see #BasicHttpRequest(String, String) */ @Override public ProtocolVersion getProtocolVersion() { return getRequestLine().getProtocolVersion(); }
/** * Returns the HTTP protocol version to be used for this request. * * @see #BasicHttpRequest(String, String) */ @Override public ProtocolVersion getProtocolVersion() { return getRequestLine().getProtocolVersion(); }
/** * Returns the HTTP protocol version to be used for this request. * * @see #BasicHttpRequest(String, String) */ public ProtocolVersion getProtocolVersion() { return getRequestLine().getProtocolVersion(); }
/** * Returns the HTTP protocol version to be used for this request. * * @see #BasicHttpRequest(String, String) */ @Override public ProtocolVersion getProtocolVersion() { return getRequestLine().getProtocolVersion(); }
/** * Returns the HTTP protocol version to be used for this request. * * @see BasicHttpRequest#BasicHttpRequest(String, String) */ public ProtocolVersion getProtocolVersion() { return getRequestLine().getProtocolVersion(); }
private HttpRequestWrapper(final HttpRequest request) { super(); this.original = request; this.version = this.original.getRequestLine().getProtocolVersion(); this.method = this.original.getRequestLine().getMethod(); if (request instanceof HttpUriRequest) { this.uri = ((HttpUriRequest) request).getURI(); } else { this.uri = null; } setHeaders(request.getAllHeaders()); }
public ProtocolVersion getProtocolVersion() { if (this.requestline != null) { return this.requestline.getProtocolVersion(); } else { return HttpProtocolParams.getVersion(getParams()); } }
public ProtocolVersion getProtocolVersion() { if (this.requestline != null) { return this.requestline.getProtocolVersion(); } else { return HttpProtocolParams.getVersion(getParams()); } }
public ProtocolVersion getProtocolVersion() { if (this.requestline != null) { return this.requestline.getProtocolVersion(); } else { return HttpProtocolParams.getVersion(getParams()); } }
public ProtocolVersion getProtocolVersion() { if (this.requestline != null) { return this.requestline.getProtocolVersion(); } else { return HttpProtocolParams.getVersion(getParams()); } }
private HttpRequestWrapper(final HttpRequest request, final HttpHost target) { super(); this.original = Args.notNull(request, "HTTP request"); this.target = target; this.version = this.original.getRequestLine().getProtocolVersion(); this.method = this.original.getRequestLine().getMethod(); if (request instanceof HttpUriRequest) { this.uri = ((HttpUriRequest) request).getURI(); } else { this.uri = null; } setHeaders(request.getAllHeaders()); }