[Fwd: issue with default contentType in ServletUnitHttpResponse]

Tim Diggins <[email protected]>
Newsgroups gmane.comp.web.httpunit.devel
Message-ID <[email protected]>
Hi -

I'm using HttpUnit to test my Spring+Freemarker based webapp. It's going
really well, with one or two glitches... One of the glitches I've now
tracked down...

In order to have a default ContentType in my app, spring's mvc framework
is expecting the contentType of the response to be initially null (which
is how it is created in tomcat's implementation of HttpServletResponse
for example).

However com.meterware.servletunit.ServletUnitHttpResponse (as
instantiated by the InvocationContext) has contentType hardcoded to
"text/plain", BEFORE it packs off the contentType off to the servlet to
handle.
{{{

543     private String _contentType = "text/plain";

}}}

Is there a good reason for this, or should it actually be left to be
initially null (or should there be a ServletUnitOptions class with
.setDefaultContentType (like HttpUnitOptions)

thanks

Tim


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.