Mirror of Apache HttpClient
Go to file
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
fluent-hc Upgraded HttpClient version to 4.5.13-SNAPSHOT 2020-03-07 10:04:58 +01:00
httpclient BasicExpiresHandler is annotated as immutable but is not. (#239) 2020-07-08 08:05:34 -04:00
httpclient-cache Avoid updating Content-Length header in a 304 response. 2020-10-03 12:30:11 +02:00
httpclient-osgi Upgraded HttpClient version to 4.5.13-SNAPSHOT 2020-03-07 10:04:58 +01:00
httpclient-win Upgraded HttpClient version to 4.5.13-SNAPSHOT 2020-03-07 10:04:58 +01:00
httpmime Upgraded HttpClient version to 4.5.13-SNAPSHOT 2020-03-07 10:04:58 +01:00
src/docbkx Correct spelling of user 'principal' in the documentation 2015-08-11 10:00:42 +00:00
.gitignore Ignore Eclipse .checkstyle file. 2017-07-12 17:10:50 -07:00
.travis.yml Use `dist: trusty` for Travis CI 2019-08-22 17:02:13 +02:00
BUILDING.txt Added a section called "Validating packages". 2014-09-20 18:52:54 +00:00
LICENSE.txt Added a statement to NOTICE regarding distribution of the Public Suffix List copied from <https://publicsuffix.org/list/effective_tld_names.dat> licensed under MPLv2; added MPLv2 license text 2014-09-08 13:37:56 +00:00
NOTICE.txt Updated NOTICE 2020-01-15 11:15:35 +01:00
README.txt HTTPCLIENT-1623: Several files still refer to Java 1.5 2015-02-26 20:59:56 +00:00
RELEASE_NOTES.txt Correct status code typo in release notes 2020-06-18 09:42:47 +02:00
doap_HttpComponents_Client.rdf Updated repository details in DOAP; removed outdated release data 2017-11-25 11:09:18 +01:00
pom.xml Upgraded HttpClient version to 4.5.13-SNAPSHOT 2020-03-07 10:04:58 +01:00

README.txt

Apache HttpComponents Client
============================

Welcome to the HttpClient component of the Apache HttpComponents project.

Building Instructions
---------------------

For building from source instructions please refer to BUILDING.txt.

Dependencies
------------

HttpClient main module requires Java 6 compatible runtime and
depends on the following external libraries:

* Apache HttpComponents HttpCore
* Apache Commons Logging
* Apache Commons Codec

(for detailed information on external dependencies please see pom.xml)

HttpMime module is optional and requires Java 6 compatible runtime
and depends on the following external libraries:

* Apache HttpComponents HttpCore
* Apache Commons Logging

(for detailed information on external dependencies please see pom.xml)

Licensing
---------

Apache HttpComponents Client is licensed under the Apache License 2.0.
See the files called LICENSE.txt and NOTICE.txt for more information.

Cryptographic Software Notice
-----------------------------

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 <http://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.

Contact
-------

  o For general information visit the main project site at
    http://hc.apache.org/

  o For current status information visit the status page at
    http://hc.apache.org/status.html