Seeking on an HTTP resource always downloads ALL content if a Content-Length header is present. The problem is that seeking closes the current input stream which eventually ends up in ContentLengthInputStream.close() of the (ancient) http client library.
To be clear, the problem is actually not with the seek itself, but with the underlying close implementation that always exhausts the HTTP response body. See the example below.
My use case is to perform binary search on sorted datasets on the Web (RDF data in sorted ntriple syntax) - the binary search works locally and in principle works on HTTP resources abstracted with VFS2, but the seek implementation that downloads ALL data (in my case several GBs) unfortunately defeats the purpose
From org.apache.commons.httpclient.ContentLengthInputStream (commons-httpclient-3.1):
Output (times in milliseconds):