Commit Graph

667 Commits

Author SHA1 Message Date
Oleg Kalnichevski 27bb5a0821 Experimental connections pool implementation that acts as a caching facade in front of a standard ManagedConnPool and shares already leased connections to multiplex message exchanges over active HTTP/2 connections. 2024-11-27 13:50:53 +01:00
Arturo Bernal 0b56a628c5
HTTPCLIENT-2350 - Refactored the connect method in DefaultHttpClientConnectionOperator to enhance flexibility in address resolution, specifically allowing for direct handling of unresolved addresses. Updated DnsResolver to introduce a new resolve method supporting both standard and bypassed DNS lookups, enabling improved support for non-public resolvable hosts like .onion endpoints via SOCKS proxy. Adjusted related tests to align with the new resolution mechanism. (#598) 2024-11-16 16:23:57 +01:00
Arturo Bernal 4b2a365c36
Enhance DigestScheme for RFC 7616 Compliance and Expanded Hash Algorithm Support (#597)
* Support RFC 7616 compliance in DigestScheme with extended hash algorithm support and charset

Enhanced DigestScheme to support SHA-256, SHA-512/256,  algorithms in compliance with RFC 7616.
Adjusted cnonce generation for adequate entropy in SHA-256 and SHA-512/256 contexts.

* Increase MD5 cnonce length to 16 bytes for full 128-bit entropy

* Use represent supported algorithms.
2024-11-13 19:44:15 +01:00
Arturo Bernal 40d6ba4ee5
Added NextNonceInterceptor to check the `Authentication-Info` header in HTTP Digest Access Authentication, extracting the `nextnonce` parameter when present and storing it in `HttpClientContext`. This supports compliance with RFC 7616, enhancing client authentication continuity. (#596) 2024-11-03 15:50:09 +01:00
Arturo Bernal 28c3ea0fd2
Add client-side `rspauth` value for Digest auth, verifying server knowledge of shared secret per RFC 7616. (#594) 2024-10-29 18:21:23 +01:00
Gary Gregory 70521e0207 Fix typos in debug log messages 2024-10-26 08:55:29 -04:00
Oleg Kalnichevski 75bf4f7374 Fixed the problem with request specific push handlers being ignored; added push response integration test 2024-10-24 15:56:21 +02:00
Oleg Kalnichevski d7959d6f29 Removed a work-around for incorrect HTTP/1.1 async connection state reporting which has been fixed in core since 5.3.1 2024-10-22 16:13:48 +02:00
Oleg Kalnichevski 0564320d73 HTTPCLIENT-2346: Javadoc correction 2024-10-18 10:49:03 +02:00
yhzdys b45e9818cc Bug fix: Correct the issue with connection state detection in DefaultManagedAsyncClientConnection#isOpen(). 2024-10-17 13:26:18 +02:00
Oleg Kalnichevski d68f8b068a Bug fix: Fixed propagation of runtime exceptions thrown during connection route setup 2024-10-17 12:10:08 +02:00
Osip Fatkullin 001eff7064 Corrected method chaining in ClientTlsStrategyBuilder 2024-10-13 11:32:46 +02:00
Oleg Kalnichevski 9941fde19e Upgraded HC StyleCheck to version 3; fixed style-check violations (no functional changes) 2024-10-01 11:08:03 +02:00
Arturo Bernal db623f8854 HTTPCLIENT-2337: Sanitize X500Principal Logging in ClientTlsStrategy classes (#581)
* HTTPCLIENT-2337: Add sanitizeX500Principal method to escape control characters in X500Principal. Escapes ISO control characters in X500Principal using hexadecimal representation.

* Remove "Escaped" from debug log message

* Use a single call to append() for each character in toEscapedString()

---------

Co-authored-by: Gary Gregory <garydgregory@users.noreply.github.com>
2024-10-01 11:08:01 +02:00
Oleg Kalnichevski 3b5c815f5c HTTPCLIENT-2338: put compress exec interceptor after retry exec interceptor 2024-09-12 15:35:47 +02:00
Gary Gregory d9a78ce076 Javadoc and reduce boilerplate
- Use final
- package-private methods can throw more precise exception
- Add missing Javadoc comments
- Use lambdas
- Better StringBuilder allocation
- Make private final class a static class
- Make private instance variable final in test
- Single lambda parameter does not need parentheses
- Package-private class constructor can be package-private
2024-09-12 14:47:02 +02:00
Gary Gregory 25f080f307 Private method does not throw checked exception
- Remove it from the private method signatures
- Remove exception handling no longer needed
- Add missing @Override
- No need to nest in an else clause (reduce clutter)
- Use ternary expression
- public methods in a package-private class can be package-private
2024-08-26 11:29:09 -04:00
Gary Gregory a1eed8084d Javadoc
- Remove redundant parentheses
- No need to nest into else clause
- Add missing @Override
2024-08-26 10:49:26 -04:00
Gary Gregory 648690fdfd Includes a copy of in
https://publicsuffix.org/list/effective_tld_names.dat
in httpclient5/src/test/resources/org/publicsuffix/list/effective_tld_names.dat

Cleanly separate the concerns of which file to copy and whether to
filter it or not by using two <resource> elements:

- We want the .properties file copied and filtered. The git master
version causes only the properties file to be copied, the .dat file is
not copied.
- We want to the .dat file copied but not filtered.
2024-08-25 13:07:59 -04:00
Gary Gregory 044a71755c Fix file handle leak in TestPublicSuffixMatcher
- Add message to assertion
- Use tryt-with-resources
2024-08-23 08:23:59 -04:00
Gary Gregory 883dbe3ce7 Javadoc improvements 2024-08-22 18:14:42 -04:00
Gary Gregory 01c478b7d8 DeflateInputStream extends FilterInputStream
- Reduces boilerplate
- Improve Javadoc
- Internal static class can be private
- Reuse constant Deflater.DEFLATED
2024-08-22 08:10:28 -04:00
Oleg Kalnichevski bc9d925c84 HTTPCLIENT-2335: Added #close method with CloseMode parameter to CloseableHttpResponse 2024-08-20 14:14:58 +02:00
Oleg Kalnichevski ec4da301bc HTTPCLIENT-2336: Corrected hostname identity verification logic 2024-08-19 17:40:30 +02:00
Adrian Woodhead 715ec11060 HTTPCLIENT-2336: Updated PublicSuffixMatcher to use 'formal algorithm' as specified https://github.com/publicsuffix/list/wiki/Format#formal-algorithm 2024-08-19 17:38:10 +02:00
Gary Gregory 66a355c991 Reimplement LoggingInputStream as a FilterInputStream
- No need to track delegate, it's in super
- Constructor shouldn't be public since the class is package-private
- Normalize message in available() to match other methods
- Inherit mark/reset behavior which we don't use anyway
- skip() uses "in" like other methods for consistency
2024-08-18 16:40:26 -04:00
Gary Gregory bc9f902bc0 Javadoc improvements
- No need to use a FQCN when the name is already importted
- Import type instead of using a FQCN
- Use camel-case in paramerter name
- Add missing Javadoc
- Add some missing return tags
- Close some HTML tags
- Fix some comments
- Update Javadoc links
2024-08-17 14:27:07 -04:00
Gary Gregory 75aabd7f62 Javadoc improvements
- No need to use a FQCN when the name is already importted
- Import type instead of using a FQCN
- Use camel-case in paramerter name
- Add missing Javadoc
- Add some missing return tags
- Close some HTML tags
- Fix some comments
- Update Javadoc links
2024-08-17 11:20:08 -04:00
Gary Gregory d05f4c5c8c Replace ternary with Objects.toString() 2024-08-17 10:24:37 -04:00
Gary Gregory 71062ea164 Replace ternary with String.valueOf() 2024-08-17 10:24:12 -04:00
Gary Gregory 2dafdca160 Input streams returned by DecompressingEntity.getContent() should
support mark(int) and reset() if the underlying stream does

- Pass calls to the underlying InputStream for mark(int)
- Pass calls to the underlying InputStream for reset()
- LazyDecompressingInputStream extends FilterInputStream
- Reimplement internals fluently
- Reuse Closer.close(Closeable)
- Tested locally with git master 5.3-beta2-SNAPSHOT
2024-08-17 10:15:22 -04:00
Oleg Kalnichevski d7ed56894a Improved FQDN matching 2024-08-16 17:02:19 +02:00
Oleg Kalnichevski a61f60b4bd HTTPCLIENT-2333: update execution scope upon request redirect in order to avoid re-execution of the original request in case of an i/o error 2024-08-05 16:55:39 +02:00
otavio.prado df5ab533af added LaxRedirectStrategy from 4.x 2024-08-03 17:08:51 +02:00
Oleg Kalnichevski 97247f0c8c Added example of manual connection release 2024-07-15 11:32:21 +02:00
strangelookingnerd cc13243cd3 Minor code cleanup 2024-06-27 23:11:05 +02:00
strangelookingnerd 420910da4f Fix assertions 2024-06-27 23:11:05 +02:00
strangelookingnerd 185d4e32aa Test classes and methods should have default package visibility 2024-06-27 23:11:05 +02:00
Oleg Kalnichevski e45345876e Use CompletedFuture from core 2024-06-27 09:54:40 +02:00
Oleg Kalnichevski ee0a102104 HTTPCLIENT-2328: Blocking i/o connections to check if the opposite TLS endpoint has been closed by the opposite endpoint while writing out request body 2024-06-22 17:20:59 +02:00
Oleg Kalnichevski 10e8a7acbc Replaced deprecated functionality 2024-06-22 15:22:34 +02:00
Oleg Kalnichevski 1cd7f8f2d0 Moved test cases that require an embedded test server to the integration test module 2024-06-21 11:06:57 +02:00
Oleg Kalnichevski 034cd65aa5 Redesign of test server APIs and integration test setup 2024-06-21 10:49:11 +02:00
Arturo Bernal 336263da6c
Fix HTTPCLIENT-2331: Skip cookie header generation if a Cookie header is already present (#561)
This fix ensures that if a Cookie header is already present in the request, HttpClient skips adding additional Cookie headers from the BasicCookieStore.
2024-06-20 08:05:55 +02:00
Gary Gregory 4c42c70a51 Tokenizer is immutable and thread safe, so reuse it. 2024-06-10 18:27:21 -04:00
Gary Gregory 225edf5ea8 Javadoc singleton versus default instances 2024-06-10 18:21:36 -04:00
Oleg Kalnichevski 215571a0bd HTTPCLIENT-2326: Propagate original proxy response to the caller in case of HTTP CONNECT request failure 2024-06-06 14:32:33 +02:00
Oleg Kalnichevski def10b4c77 Javadoc correction 2024-06-05 14:44:49 +02:00
Gary Gregory ebd5d87340 Use the same spacing in log message as other entries 2024-05-22 13:51:16 -04:00
Gary Gregory 15b93d481b Javadoc
- Add generic type documentation
- Add parameter documentation
2024-05-22 13:49:54 -04:00