MockHttpServletResponse.setContentType() does not set proper HTTP headers
-------------------------------------------------------------------------

                 Key: STS-770
                 URL: http://www.stripesframework.org/jira/browse/STS-770
             Project: Stripes
          Issue Type: Bug
    Affects Versions: Release 1.5.3
            Reporter: Janne Jalkanen
            Priority: Minor


Expected:

ActionBean calls response.setContentType("image/jpeg"). Unit test 
assertEquals("image/jpeg", 
trip.getResponse().getHeaderMap().get("Content-Type").get(0)) passes.

What happens: NullPointerException.

Solution: MockHttpServletResponse.setContentType() should also set the 
Content-Type header.

Workaround: use response.getContentType() [which of course does not check that 
the actual HTTP headers are correct.]

Stripes works ok when ActionBean is subjected to harsh reality, but testing is 
a bit hard :-).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://www.stripesframework.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to