Revision: 1277
http://stripes.svn.sourceforge.net/stripes/?rev=1277&view=rev
Author: bengunter
Date: 2010-09-24 18:10:47 +0000 (Fri, 24 Sep 2010)
Log Message:
-----------
Fixed STS-765: MockHttpServletResponse.sendRedirect() does not set proper
status code.
Modified Paths:
--------------
branches/1.5.x/stripes/src/net/sourceforge/stripes/mock/MockHttpServletResponse.java
Modified:
branches/1.5.x/stripes/src/net/sourceforge/stripes/mock/MockHttpServletResponse.java
===================================================================
---
branches/1.5.x/stripes/src/net/sourceforge/stripes/mock/MockHttpServletResponse.java
2010-09-24 17:05:28 UTC (rev 1276)
+++
branches/1.5.x/stripes/src/net/sourceforge/stripes/mock/MockHttpServletResponse.java
2010-09-24 18:10:47 UTC (rev 1277)
@@ -89,8 +89,14 @@
/** Sets that status code to the error code provided. */
public void sendError(int status) throws IOException { this.status =
status; }
- /** Simply stores the URL that was supplied, so that it can be examined
later with getRedirectUrl. */
- public void sendRedirect(String url) throws IOException { this.redirectUrl
= url; }
+ /**
+ * Simply sets the status code and stores the URL that was supplied, so
that it can be examined
+ * later with getRedirectUrl.
+ */
+ public void sendRedirect(String url) throws IOException {
+ this.status = HttpServletResponse.SC_MOVED_TEMPORARILY;
+ this.redirectUrl = url;
+ }
/**
* If a call was made to sendRedirect() this method will return the URL
that was supplied.
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development