mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-29 15:22:15 +00:00
Call to getCookies() should return Cookies, not SavedCookies
This commit is contained in:
parent
88825089a7
commit
fa3c61b19b
@ -17,12 +17,12 @@ package org.acegisecurity.ui.savedrequest;
|
||||
|
||||
import org.acegisecurity.util.PortResolver;
|
||||
import org.acegisecurity.util.UrlUtils;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import javax.servlet.http.Cookie;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
@ -31,9 +31,6 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.Cookie;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
|
||||
/**
|
||||
* Represents central information from a <code>HttpServletRequest</code>.<p>This class is used by {@link
|
||||
@ -133,7 +130,7 @@ public class SavedRequest implements java.io.Serializable {
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
private void addCookie(Cookie cookie) {
|
||||
cookies.add(cookie);
|
||||
cookies.add(new SavedCookie(cookie));
|
||||
}
|
||||
|
||||
private void addHeader(String name, String value) {
|
||||
@ -161,7 +158,6 @@ public class SavedRequest implements java.io.Serializable {
|
||||
*
|
||||
* @param request DOCUMENT ME!
|
||||
* @param portResolver DOCUMENT ME!
|
||||
*
|
||||
* @return DOCUMENT ME!
|
||||
*/
|
||||
public boolean doesRequestMatch(HttpServletRequest request, PortResolver portResolver) {
|
||||
@ -180,7 +176,8 @@ public class SavedRequest implements java.io.Serializable {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!propertyEquals("serverPort", new Integer(this.serverPort), new Integer(portResolver.getServerPort(request)))) {
|
||||
if (!propertyEquals("serverPort", new Integer(this.serverPort), new Integer(portResolver.getServerPort(request))))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -212,7 +209,12 @@ public class SavedRequest implements java.io.Serializable {
|
||||
}
|
||||
|
||||
public List getCookies() {
|
||||
return cookies;
|
||||
List cookieList = new ArrayList(cookies.size());
|
||||
for (Iterator iterator = cookies.iterator(); iterator.hasNext();) {
|
||||
SavedCookie savedCookie = (SavedCookie) iterator.next();
|
||||
cookieList.add(savedCookie.getCookie());
|
||||
}
|
||||
return cookieList;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user