changed from chunked read to integral read of html documents