@Test public void addTransferEncodingIfNecessaryContentLength() { assertTrue(httpRequest.headers().isEmpty()); httpRequest.headers().add(CONTENT_LENGTH, "10"); assertEquals(1, httpRequest.headers().size()); addRequestTransferEncodingIfNecessary(httpRequest); assertEquals(1, httpRequest.headers().size()); assertFalse(isTransferEncodingChunked(httpRequest.headers())); assertEquals("10", httpRequest.headers().get(CONTENT_LENGTH)); }
static void addRequestTransferEncodingIfNecessary(final StreamingHttpRequest request) { if (canAddRequestTransferEncoding(request)) { request.headers().add(TRANSFER_ENCODING, CHUNKED); } }
HeaderUtils { static void addRequestTransferEncodingIfNecessary(final StreamingHttpRequest request) { if (canAddRequestTransferEncoding(request)) { request.headers().add(TRANSFER_ENCODING, CHUNKED); } } }
HeaderUtils { static void addRequestTransferEncodingIfNecessary(final StreamingHttpRequest request) { if (canAddRequestTransferEncoding(request)) { request.headers().add(TRANSFER_ENCODING, CHUNKED); } } private  HeaderUtils(); }
HeaderUtils { static void addRequestTransferEncodingIfNecessary(final StreamingHttpRequest request) { if (canAddRequestTransferEncoding(request)) { request.headers().add(TRANSFER_ENCODING, CHUNKED); } } private  HeaderUtils();  }
HeaderUtils { static void addRequestTransferEncodingIfNecessary(final StreamingHttpRequest request) { if (canAddRequestTransferEncoding(request)) { request.headers().add(TRANSFER_ENCODING, CHUNKED); } } private  HeaderUtils();   }