jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J. B. Rainsberger" <jbra...@rogers.com>
Subject Re: [Help] Servlet response's encoding of new lines, what is the correct behavior?
Date Sat, 27 Mar 2004 18:19:17 GMT
Vincent Massol wrote:

> Thanks to all who have sent suggestions. However, I did not phrase my
> question well enough. The goal of this test is to verify that receiving
> several lines of response content works fine. The name of the test is:
> testGetResponseAsStringMultiLines
> 
> I was surprised to see that different containers yielded different
> result on this. My question is: is that normal? Isn't this behavior
> defined in the servlet spec? Is it possible by some setting to control
> the output of containers WRT line-endings?
> 
> Of course, if the answer to this is that it's dependent on containers,
> it's not defined in the servlet spec and there's no way to control what
> the server answers, then of course, I'll modify the test so that we
> don't check for line endings.
> 
> But before concluding this I'd like to know if the bug is in the
> container's implementation or not.

Either way, it is advised to parse the response into a collection of 
lines, stripping line separators, then comparing the resulting collections.
-- 
J. B. Rainsberger,
Diaspar Software Services
http://www.diasparsoftware.com :: +1 416 791-8603
Let's write software that people understand

Mime
View raw message