Revision: 1278
          http://stripes.svn.sourceforge.net/stripes/?rev=1278&view=rev
Author:   bengunter
Date:     2010-09-24 18:12:19 +0000 (Fri, 24 Sep 2010)

Log Message:
-----------
Applied fix for STS-765 from 1.5.x branch.

Modified Paths:
--------------
    trunk/stripes/src/net/sourceforge/stripes/mock/MockHttpServletResponse.java

Modified: 
trunk/stripes/src/net/sourceforge/stripes/mock/MockHttpServletResponse.java
===================================================================
--- trunk/stripes/src/net/sourceforge/stripes/mock/MockHttpServletResponse.java 
2010-09-24 18:10:47 UTC (rev 1277)
+++ trunk/stripes/src/net/sourceforge/stripes/mock/MockHttpServletResponse.java 
2010-09-24 18:12:19 UTC (rev 1278)
@@ -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

Reply via email to