Commit Graph

3731 Commits

Author SHA1 Message Date
Oleg Kalnichevski a999d900c6 Disabled a test case that fails intermittently with GitHub Actions, pending revision 2025-01-21 21:25:28 +01:00
Oleg Kalnichevski 2f6694fcf3 Improved internal state representation of the internal async execution runtime in order to present potential race conditions 2025-01-21 21:10:19 +01:00
Oleg Kalnichevski ff87bf0075 HTTPCLIENT-2357, regression: Classic HttpClient fails to release connect in case of a proxy authentication failure 2025-01-21 20:52:41 +01:00
Oleg Kalnichevski be62a1b726 HTTPCLIENT-2355, regression: Reset protocol version in the execution context upon 200 response to CONNECT request 2025-01-20 18:42:54 +01:00
Arturo Bernal ed9594acba
Decode Subject Alternative Names for IP, DNS, and binary data (#610)
Supports DNS names as plain text, IPv4 and IPv6 addresses in binary form, and falls back to hex encoding for unknown types.
2025-01-20 17:21:18 +01:00
Oleg Kalnichevski e2c24b9f30 Upgraded HttpCore to version 5.3.2 2025-01-09 22:06:18 +01:00
Arturo Bernal 8b1ee82bfd
Fix HTTPCLIENT-2354 by updating ResponseCachingPolicy to allow caching of responses with "must-revalidate, max-age=0" in shared caches with Authorization headers. The change aligns with RFC 9111 Section 5.2.2.2, ensuring responses with "must-revalidate," "s-maxage," or "public" directives are cacheable. This addresses cases where responses with Authorization headers were unnecessarily excluded from caching. (#609) 2025-01-09 16:10:40 +01:00
Oleg Kalnichevski becb177745 Do not add `Upgrade` header if `Connection` header already present (the caller manually manages connection state) 2025-01-07 21:26:11 +01:00
Oleg Kalnichevski aa95f0b396 Avoid logging HTTP message version where it can be a hint, not an actual protocol version 2025-01-07 21:26:02 +01:00
Arturo Bernal 3c82807ad8
Normalize IDN hostnames to punycode before DNS resolution to prevent UnknownHostException during connection. (#608) 2025-01-06 14:42:26 +01:00
Arturo Bernal 9e3559ef93
HTTPCLIENT-2353: Fix IDN hostname mismatch by normalizing identity with IDN.toUnicode before comparison so that Unicode and punycode forms match correctly. (#607) 2025-01-06 10:15:31 +01:00
Oleg Kalnichevski 55cdd9e94f 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-12-22 14:50:38 +01:00
Patrick Neulichedl 90da166323 fix(examples): Typo in ClientConfiguration example
This was forgotten in commit: 04594b97a9
2024-12-22 14:46:28 +01:00
Oleg Kalnichevski 92f9598e3e Updated H2 example apps that use nghttp2.org as their target server 2024-12-22 14:46:19 +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 1898dffcdb Reuse Function.identity() 2024-10-29 13:16:27 -04: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 e2ca5838d8 Upgraded HttpCore to version 5.3.1 2024-10-22 15:54:05 +02:00
Oleg Kalnichevski 78f65a9100 Upgraded Squid image to ubuntu/squid:5.2-22.04_beta 2024-10-20 21:54:21 +02:00
Oleg Kalnichevski 221af7524f Corrected Test CA configuration 2024-10-20 21:15:43 +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
Oleg Kalnichevski 29bf4bde45 Re-enabled async client authentication tests 2024-10-16 13:47:45 +02:00
Oleg Kalnichevski 0335839e22 Migrated Docker based integration tests to TestContainers 2024-10-15 22:17:51 +02:00
Oleg Kalnichevski cc6901798f Bug fix: async cache protocol handler incorrectly updates the actual cache entry in the cache execution context upon cache entry re-validation 2024-10-14 17:58:52 +02:00
Oleg Kalnichevski 81563724d9 Bug fix: response Cache-Control attribute does not get updated in the cache execution context in case of a cache miss 2024-10-14 14:25:39 +02:00
Osip Fatkullin 001eff7064 Corrected method chaining in ClientTlsStrategyBuilder 2024-10-13 11:32:46 +02:00
Oleg Kalnichevski a13ed04544 Upgraded HC Parent to version 14 2024-10-01 11:12:40 +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 238e73a73c Upgraded HttpClient version to 5.5-alpha1-SNAPSHOT 2024-10-01 11:07:38 +02:00
Oleg Kalnichevski b4d102afd5 Updated release notes for HttpClient 5.4 release 2024-09-16 17:03:02 +02:00
Oleg Kalnichevski 3b5c815f5c HTTPCLIENT-2338: put compress exec interceptor after retry exec interceptor 2024-09-12 15:35:47 +02:00
Oleg Kalnichevski 12409713eb Replaced deprecated functionality 2024-09-12 15:13:08 +02:00
Oleg Kalnichevski 65e6eb06f2 Upgraded HttpCore to version 5.3 2024-09-12 14:51:22 +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 5b546de35c Bump log4j.version from 2.23.0 to 2.23.1 2024-08-24 09:31:37 -04:00
Gary Gregory 0d6bb65185 ConsumableInputStream extends FilterInputStream
- Reduces boilerplace in the test fixture
- Use Mockito like the rest of the updated test
- Rework test setup to pass on Java 17 and 21 with Mockito
2024-08-24 07:59:29 -04:00
dependabot[bot] e731ffd161 Bump org.hamcrest:hamcrest from 2.2 to 3.0
Bumps [org.hamcrest:hamcrest](https://github.com/hamcrest/JavaHamcrest) from 2.2 to 3.0.
- [Release notes](https://github.com/hamcrest/JavaHamcrest/releases)
- [Changelog](https://github.com/hamcrest/JavaHamcrest/blob/master/CHANGES.md)
- [Commits](https://github.com/hamcrest/JavaHamcrest/compare/v2.2...v3.0)

---
updated-dependencies:
- dependency-name: org.hamcrest:hamcrest
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-23 13:43:14 -04:00
dependabot[bot] cb99e319db Bump org.junit:junit-bom from 5.10.2 to 5.11.0
Bumps [org.junit:junit-bom](https://github.com/junit-team/junit5) from 5.10.2 to 5.11.0.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.10.2...r5.11.0)

---
updated-dependencies:
- dependency-name: org.junit:junit-bom
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-23 13:09:13 -04:00
dependabot[bot] fc1bae5596 Bump com.googlecode.maven-download-plugin:download-maven-plugin
Bumps [com.googlecode.maven-download-plugin:download-maven-plugin](https://github.com/maven-download-plugin/maven-download-plugin) from 1.8.1 to 1.9.0.
- [Release notes](https://github.com/maven-download-plugin/maven-download-plugin/releases)
- [Commits](https://github.com/maven-download-plugin/maven-download-plugin/compare/1.8.1...1.9.0)

---
updated-dependencies:
- dependency-name: com.googlecode.maven-download-plugin:download-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-23 08:40:28 -04:00