You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Ryan Lubke <Ry...@Sun.COM> on 2002/07/12 20:48:08 UTC
[HttpClient][PATCH] Take 2 with Host request-header
Ok,
Based on advise regarding the previous patch, I've attached a new patch
for HttpMethodBase as well as TestWebappHeaders.
I thought TestWebappHeaders was the most appropriate location for this
test. If there is a better place, let me know.
Lastly, there is still the outstanding issue of configuration for
strict compliance in both HTTP/1.0 and HTTP/1.1. This patch
makes note that this still needs to be addressed.
Changes HttpMethodBase
-------------------------
- Added isIpAddress(String) - determines if provided value is an
IP address or not (performs validation that the parsed values
are in the required range, etc).
- addHostRequestHeader - If the value provided for the target host
is an IP address, the Host header will be sent, but without a
value.
If the value provided is a hostname, and the port is 80,
then only the value will be present in the Host request-header.
Any port other than 80 will be present in the Host request-header
in the form of <hostname>:<port>.
Changes to TestWebappHeaders
------------------------------------
- Added test to validate the behavior of addHostRequestHeader in the
case of an IP address and hostname.