hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <http-as...@dubioso.net>
Subject Re: HttpClient and Large File (>2GB) Support
Date Mon, 07 Aug 2006 19:40:19 GMT
Hi Paul,

> Ok.  I'll try that.  But I guess the question remains, if this isn't a
> problem with the client side, is there a way to find the root cause of
> the problem and fix it on the server side?

The root cause is that the designers of the Java language decided to
provide only signed integers, not unsigned ones. It is quite common
to use the faster 'int' rather than 'long' variables for counters,
and if the counter goes beyond 2 GB, you run into problems.
By removing the Content-Length header, you are removing one possible
cause of a problem that can even be found in the Servlet API:
http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletRequest.html#getContentLength()
Notice that the return value is an int, not a long?

Of course you can file a bug report against the server software,
but I wouldn't count on getting it fixed if removing the header
is a suitable workaround. If sending the data without the length
still causes an exception, then you'd have to push the issue.

cheers,
  Roland


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Mime
View raw message