commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Lubke <Ryan.Lu...@Sun.COM>
Subject [HttpClient][PATCH] Take 2 with Host request-header
Date Fri, 12 Jul 2002 18:48:08 GMT

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 

   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.

View raw message