----- Original Message -----
Sent: Wednesday, May 23, 2001 1:39
PM
Subject: Re: {cactus} bug? newlines
removed in response
Yes, there is a bug in Cactus 1.0. The bug has
been corrected in the CVS. So if you wish, just get Cactus from CVS and it'll
work. (FYI, the list of major changes made to Cactus in CVS are available
here :http://jakarta.apache.org/commons/cactus/changes.html). As nightly
builds are not up yet, you have to use your CVS client to get Cactus from CVS.
If this is a problem, email me and I'll send the jar to you.
Sorry for that inconvenience.
Cheers,
Vincent.
----- Original Message -----
Sent: Wednesday, May 23, 2001 4:39
PM
Subject: {cactus} bug? newlines removed
in response
I have a servlet that renders some XML.
For ease of (human) reading I've included newlines ('\n') in the code that
generates the output. Some typical output might look like
this:
<!DOCTYPE POST_RESULT SYSTEM
"ErrorFormat.dtd">
<POST_RESULT>
<ERROR>
<ERROR_CODE>180</ERROR_CODE>
<ERROR_TYPE
value="FORMAT"/>
<ERROR_TEXT>First Name is
required</ERROR_TEXT>
</ERROR>
</POST_RESULT>
I started out writing tests for my servlets
using Python and PyUnit. The strings that I test against include
newlines just as I generate them in the servlet. I got them all
working just fine. Then I decided
to port my Python test code over to Java/Cactus. When I got the
first one ported I found that it always failed because the return value from
AssertUtils.getResponseAsString(connection) did not include the newlines
that the servlet returns.
Now is there something in the framework that
removes the newlines or is there something in one of the java.net classes
that is doing this?