Hardened WebSocket transport and permessage-deflate for RFC 6455/7692 conformance Fixed the client permessage-deflate encoder, which stripped the flush trailer on every fragment and could truncate a SYNC_FLUSH, so a compressed message split across frames now decodes, and an empty final fragment is encoded as a single 0x00 octet; the frame writer derives the masking key from SecureRandom. The client no longer offers client_max_window_bits, since the JDK Deflater cannot honour a reduced window, and rejects a handshake response that echoes it. The session engine fails the connection on RSV1 set on a control frame, no longer delivers a truncated message after a 1009 close, and surfaces a selection key cancelled during shutdown as an I/O error on write so the engine takes its close path instead of retaining the frame as back-pressure. Extension negotiation on the server is stricter. Offers are parsed from every Sec-WebSocket-Extensions field and combined as RFC 6455 requires, so a client's fallback offer in a later field is still examined; a parameter repeated within an offer drops that offer; and the permessage-deflate factory accepts only recognised parameters with well-formed values, the no-context-takeover parameters carrying no value and the window-bits parameters being exactly 15, the only size the JDK Deflater supports. A given extension name is accepted only once, and an unacceptable offer is declined rather than failing the handshake. On the HTTP/2 server the handler advertises a bounded inbound flow-control window and bounds the outbound queue by a byte budget, splitting large writes into chunks and signalling the reactor after each so a write larger than the budget cannot deadlock; the frame reader rejects a 64-bit length with the most significant bit set, the frame writer enforces the 125-byte control frame limit and truncates the CLOSE reason, and the processor fails a data frame received in the middle of a fragmented message. The HTTP/2 client accepts any 2xx handshake response. Both permessage-deflate implementations release their Deflater and Inflater when the session ends. The extension chains close every codec they hold even if one of them fails, the negotiation closes each extension exactly once, and the session engine coordinates the encoder and decoder close with try/finally so a failure in one still releases the other.
Welcome to the HttpClient component of the Apache HttpComponents project.
For building from source instructions please refer to BUILDING.txt.
HttpClient main module requires Java 8 compatible runtime and depends on the following external libraries:
Other dependencies are optional.
(for detailed information on external dependencies please see pom.xml)
Apache HttpComponents Client is licensed under the Apache License 2.0. See the files LICENSE.txt and NOTICE.txt for more information.
This distribution may include software that has been designed for use with cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See https://www.wassenaar.org/ for more information.
The U.S. Government Department of Commerce, Bureau of Industry and Security (BIS), has classified this software as Export Commodity Control Number (ECCN) 5D002.C.1, which includes information security software using or performing cryptographic functions with asymmetric algorithms. The form and manner of this Apache Software Foundation distribution makes it eligible for export under the License Exception ENC Technology Software Unrestricted (TSU) exception (see the BIS Export Administration Regulations, Section 740.13) for both object code and source code.
The following provides more details on the included software that may be subject to export controls on cryptographic software:
Apache HttpComponents Client interfaces with the Java Secure Socket Extension (JSSE) API to provide
- HTTPS support
Apache HttpComponents Client does not include any implementation of JSSE.