Details
Description
If you use the webhdfs filesystem client to open a file >= 24KB it will throw an IOException saying "content-length header missing". I added a simple unit test to show this into the hdfs project and ran the test with the expected results (see webhdfsBug.txt attached for unit-test and results).
This seems to stem from the fact that the server side begins using chunked encoding when the files are >= 24KB. The client side expects a content length and to have to make several http calls in order to download the file (see org.apache.hadoop.hdfs.ByteRangeInputStream). Even though the client may specify a 'length' and 'offset' parameter the server will serve the file using chunked encoding if the file is >= 24KB.
Files < 24KB work fine with the client.