commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Hoegg <rho...@isisnetworks.net>
Subject [httpclient] Content-Length handling
Date Fri, 13 Sep 2002 19:24:11 GMT
Hello,

I am in the process of trying to build the commons HttpClient code into 
the apache XML-RPC library.  I have it working, however I have run into 
some interoperability issues.  Specifically, certain XML-RPC servers 
report a slightly smaller content-length than the actual response body. 
 java.net.URLConnection takes the entire body regardless, but I think 
HttpClient is terminating the body after Content-Length bytes have been 
received.

 From RFC2616 4.4.4 :

When a Content-Length is given in a message where a message-body is
allowed, its field value MUST exactly match the number of OCTETs in
the message-body. HTTP/1.1 user agents MUST notify the user when an
invalid length is received and detected.

Does this mean that HTTPClient should throw an exception when 
Content-Length does not match the length of the response body?  Or do we 
have some latitude here?

My immediate concern is not for strict RFC enforcement but for 
compliance with as many (possibly broken) HTTP server implementations as 
possible.  What are the priorities for the committers?

Ryan Hoegg
ISIS Networks


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message