Commit Graph

2773 Commits

Author SHA1 Message Date
dirkhenselin 8151d9e51a Avoid updating Content-Length header in a 304 response.
I observed the following problem: `Transfer-Encoding` and
`Content-Length` headers should be mutually exclusive and because I use
chunked transfer, the `Transfer-Encoding` header is set in the response
while the `Content-Length` header is not. In case of a 304 during a
revalidation, the header contains Content-Length=0. Probably a proxy is
responsible for this, just like the comment "Some well-known proxies
respond with Content-Length=0, when returning 304" in the method
CachedHttpResponseGenerator::addMissingContentLengthHeader is saying. In
CacheEntryUpdater::mergeHeaders the Content-Length=0 is merged into the
cached entry, but the cached entry contains also a `Transfer-Encoding`
header, so in the cached entry these headers aren't mutually exclusive
anymore. Because of the `Transfer-Encoding` header the method
CachedHttpResponseGenerator::addMissingContentLengthHeader isn't fixing
the `Content-Length` header and Content-Length=0 causes returning null
instead of the cached content. IMHO the `Content-Length` header should
not be merged into the cached response in case of a 304, at least if the
cached entry contains a `Transfer-Encoding` header.
2020-10-03 12:30:11 +02:00
Gary Gregory f024a5884e
BasicExpiresHandler is annotated as immutable but is not. (#239) 2020-07-08 08:05:34 -04:00
Gary Gregory 427c7d137e
Javadoc fixes. (#209) 2020-07-07 19:12:27 -04:00
Michael Osipov 26ba138d8e Correct status code typo in release notes 2020-06-18 09:42:47 +02:00
heejeongkim 32a5c0935b HTTPCLIENT-2076: fix NPE in LaxExpiresHandler (#222) 2020-04-17 11:17:16 +02:00
Oleg Kalnichevski c87a3488c4 Upgraded HttpClient version to 4.5.13-SNAPSHOT 2020-03-07 10:04:58 +01:00
Oleg Kalnichevski 729c29cb3e Updated release notes for HttpClient 4.5.12 release 2020-03-03 13:38:24 +01:00
Michael Osipov 55bd1654fc [HTTPCLIENT-2053] Add SC_PERMANENT_REDIRECT (408) to DefaultRedirectStrategy
This closes #215
2020-02-22 14:45:13 +01:00
Oleg Kalnichevski 98b9d436f8 HTTPCLIENT-2052: Fixed redirection of entity enclosing requests with non-repeatable entities; additional integration tests for redirects of entity enclosing methods 2020-02-22 09:44:58 +01:00
Oleg Kalnichevski 736c00da6d HTTPCLIENT-2047: fixed regression in DefaultHostnameVerifier causing rejection of certs with non-standard domains.
This reverts commit e0416f07
2020-01-29 09:36:17 +01:00
Oleg Kalnichevski dbc3342781 Bug fix: fixed handling of private domains by PublicSuffixMatcher 2020-01-29 09:36:17 +01:00
Oleg Kalnichevski ca0f84933a Upgraded HttpClient version to 4.5.12-SNAPSHOT 2020-01-18 10:49:39 +01:00
Oleg Kalnichevski d331eea941 Updated release notes for HttpClient 4.5.11 release 2020-01-15 11:17:08 +01:00
Oleg Kalnichevski 49d4d6b56d Updated NOTICE 2020-01-15 11:15:35 +01:00
Oleg Kalnichevski 343ac3d407 Domain name normalization 2020-01-14 09:30:39 +01:00
Oleg Kalnichevski 4381ea3e47 Upgraded HttpCore dependency to version 4.4.13 2020-01-13 15:05:36 +01:00
Ryan Schmitt e0416f07c3 DefaultHostnameVerifier: Match DNS and CN names against ICANN domains
This change ensures that during hostname verification the public suffix
list is only used to prevent wildcard matching against entire TLDs (e.g.
`*.com`). Currently, private domains are also being matched against,
which is preventing reasonable wildcards (such as
`*.s3.eu-central-1.amazonaws.com`) from being respected.
2020-01-07 22:41:44 +01:00
Oleg Kalnichevski 541783d446 HTTPCLIENT-2033: connection managers to immediately shut down all leased connection upon shutdown 2019-12-05 09:45:36 +01:00
Michael Osipov 352f04ea9f HTTPCLIENT-2020: DefaultBackoffStrategy should include TOO_MANY_REQUESTS (429) too 2019-11-27 13:11:34 +01:00
Niels Basjes 858946348f HTTPCLIENT-2030: Fix PublicSuffixMatcher::getDomainRoot on invalid hostnames 2019-11-26 14:11:20 +01:00
Oleg Kalnichevski 332a7ae919 HTTPCLIENT-2029: URIBuilder to support parsing of non-UTF8 URIs 2019-11-14 16:43:14 +01:00
Oleg Kalnichevski 232ed81d56 HTTPCLIENT-2026: Fixed URIBuilder#isOpaque() logic 2019-11-11 09:29:27 +01:00
chao chang 0f66609ec2 update text in pool stats description
total kept alive -> total available
2019-11-10 15:41:43 +01:00
Olof Larsson 3d09a43008 HTTPCLIENT-2023: Allow nested arrays and all primitive types in DefaultHttpCacheEntrySerializer 2019-11-08 09:47:55 +01:00
Olof Larsson 4a354148f0 HTTPCLIENT-2022: Use message parameter in HttpCacheEntrySerializationException constructor 2019-11-06 18:39:21 +01:00
Ryan Schmitt b184b244ad Fix fallback PublicSuffixMatcher 2019-10-02 15:48:28 -07:00
Gary Gregory 976cfe69aa Added family property #145. 2019-09-16 08:59:50 -04:00
Oleg Kalnichevski 94dec12105 Upgraded HttpClient version to 4.5.11-SNAPSHOT 2019-09-09 11:40:16 +02:00
Oleg Kalnichevski 693d2aa9eb Updated release notes for HttpClient 4.5.10 release 2019-09-05 09:28:11 +02:00
Oleg Kalnichevski e0c0c7ac7f Upgraded HttpCore dependency to version 4.4.12 2019-09-05 09:28:11 +02:00
Gary Gregory 6acbd61466 Remove extra parens. 2019-09-05 09:23:27 +02:00
Gary Gregory a91b9ff848
Refactor DefaultRedirectStrategy for subclassing. (#164)
- Adds the constructor DefaultRedirectStrategy(String[]) to construct a new instance to redirect the given HTTP methods.
- The default constructor now calls the String[] constructor.
- Reimplement the LaxRedirectStrategy default constructor to call DefaultRedirectStrategy(String[]).

All of this allows for new custom subclasses of DefaultRedirectStrategy to provide their own array of HTTP methods to redirect.
2019-08-31 10:26:48 -04:00
Jang Ryeol 62f2164b89 Modify RequestConfig Javadoc
Cleaned up duplicate sentences and addeded 'system default if applicable' from getSocketTimeout comment
2019-08-28 09:36:19 +02:00
Oleg Kalnichevski 87fae730d5 Use `dist: trusty` for Travis CI 2019-08-22 17:02:13 +02:00
Oleg Kalnichevski 4365c5242d Improved handling of request cancellation 2019-08-22 16:43:56 +02:00
Oleg Kalnichevski 779bb8c53b Fixed concurrent use of threading unsafe HttpUriRequest messages 2019-08-22 16:08:12 +02:00
jeromedemangel c1e2339f0f HTTPCLIENT-1997: Return the last domain segment instead of normalized domain name from PublicSuffixMatcher#getDomainRoot in case there is no match 2019-06-27 17:35:57 +02:00
Oleg Kalnichevski 94fc91dae2 Preserve original encoding of the URI path component if the URI is valid 2019-06-18 16:59:37 +02:00
Oleg Kalnichevski 6992339b6c Upgraded HttpClient version to 4.5.10-SNAPSHOT 2019-06-11 11:12:49 +02:00
Oleg Kalnichevski 22a6fa7d32 Updated release notes for HttpClient 4.5.9 release 2019-06-07 15:18:19 +02:00
Oleg Kalnichevski cacbc6b87f HTTPCLIENT-1991: incorrect handling of non-standard DNS entries by PublicSuffixMatcher 2019-06-01 15:53:42 +02:00
Oleg Kalnichevski e605ca0500
Merge pull request #146 from varunnvs92/4.5.x
Fix bug in URIBuilder#isPathEmpty method
2019-04-24 09:47:05 +02:00
Varun Nandi 8f6df7259a Fix bug in URIBuilder#isPathEmpty method to verify if encodedPath is an empty string 2019-04-23 16:35:15 -07:00
Oleg Kalnichevski 70585fc2d5
Merge pull request #144 from mattnelson/HTTPCLIENT-1984
HTTPCLIENT-1984: Add normalize URI to RequestConfig copy constructor
2019-04-16 19:54:53 +02:00
Matt Nelson f27cffc3c3
HTTPCLIENT-1984: Add normalize URI to RequestConfig copy constructor 2019-04-16 12:00:27 -05:00
Oleg Kalnichevski 288699c0a8 Merge branch 'HTTPCLIENT-1976' into 4.5.x 2019-04-02 12:22:53 +02:00
Artem Smotrakov c8068487fb HTTPCLIENT-1976: Unsafe deserialization in DefaultHttpCacheEntrySerializer 2019-04-02 12:16:03 +02:00
Oleg Kalnichevski 2035aaed33 Upgraded HttpClient version to 4.5.9-SNAPSHOT 2019-03-30 10:35:49 +01:00
Oleg Kalnichevski cf80e9f30c Merge branch 'release-preparation' into 4.5.x 2019-03-25 16:32:06 +01:00
Oleg Kalnichevski 2ecf72567d TLS_KRB5_EXPORT_WITH_RC4_40_SHA cipher and TLSv1.2 cause a deadlock during TLS handshake on Java 1.6. Newer JREs do not seem to be affected. 2019-03-25 15:50:42 +01:00