Re: Accessing HTTP MIME Header using HttpURLConnection
Posted By:
Lunkwill_Vroomfondel
Posted On:
Thursday, May 16, 2002 03:56 PM
if your connection-peer does not submit content-length then he does not submit it.
this could be because "he" doesnt know it in the moment the header was created (eg. dynamic content) or he simply doesnt want it.
you could either try to control each of your connection-peers or you could write a wrapper for these incomplete connections.
in this wrapper you read in the whole stream, calculate its length and produce an outputstream whose content-length header is correctly set. but i doubt this is what you can combine with your optimization process ;-)