Wrong calculation of content lengths and additional \r's together with Kaffe
Raffaele Sena
raff at aromatic.com
Wed Mar 10 13:09:36 PST 1999
>> There something strange happens. A out.print("test\n") gives
>> "test\r\n" as output and the content size is calculated one
>> character to small. For every break, the content-size is calculated
>> one character to small. Because of this, the browser didn't stop
>> loading the page (especially when using stylesheets, netscape is
>> very sensitively to the wrong content-length).
>>
>
>I think that \r\n is required in the HTTP headers by the spec.
>Therefore, probably JServ or Apache is adding it.
>
I think \r\n is required in the HTTP headers but not
in the body (after the empty line that terminates the
header the HTTP server shouldn't know what type the data
are, so it shouldn't touch it). But the content length should
be the length in bytes of the data. If that's wrong it sounds
like a problem of NOT opening the file in binary mode and so
getting wrong lines length (but shouldn't this be a problem only
on DOS/Windows application ?)
-- Raffaele
More information about the kaffe
mailing list