getCookies is a httpServletRequestMethod, not a httpServletResponseMethod
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 20 Apr 2010 22:11:15 +0000 (22:11 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 20 Apr 2010 22:11:15 +0000 (22:11 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@936086 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/connector/Response.java
java/org/apache/catalina/core/DummyResponse.java

index 7b9ff60..7c5aba7 100644 (file)
@@ -235,12 +235,6 @@ public class Response
 
 
     /**
-     * The set of Cookies associated with this Response.
-     */
-    protected ArrayList<Cookie> cookies = new ArrayList<Cookie>();
-
-
-    /**
      * Using output stream flag.
      */
     protected boolean usingOutputStream = false;
@@ -281,8 +275,6 @@ public class Response
         error = false;
         isCharacterEncodingSet = false;
         
-        cookies.clear();
-
         if (Globals.IS_SECURITY_ENABLED || Connector.RECYCLE_FACADES) {
             if (facade != null) {
                 facade.clear();
@@ -865,15 +857,6 @@ public class Response
 
 
     /**
-     * Return an array of all cookies set for this response, or
-     * a zero-length array if no cookies have been set.
-     */
-    public Cookie[] getCookies() {
-        return cookies.toArray(new Cookie[cookies.size()]);
-    }
-
-
-    /**
      * Return the value for the specified header, or <code>null</code> if this
      * header has not been set.  If more than one value was added for this
      * name, only the first is returned; use getHeaderValues() to retrieve all
@@ -995,7 +978,6 @@ public class Response
         }
         if (!set) {
             addHeader(headername, sb.toString());
-            cookies.add(cookie);
         }
         
         
@@ -1017,8 +999,6 @@ public class Response
         // RFC2965 is not supported by browsers and the Servlet spec
         // asks for 2109.
         addHeader("Set-Cookie", sb.toString());
-
-        cookies.add(cookie);
     }
 
     public StringBuffer generateCookieString(final Cookie cookie) {
index 9f87bdb..9ebb51d 100644 (file)
@@ -100,7 +100,6 @@ public class DummyResponse
     public void setContentType(String type) {}
     public void setLocale(Locale locale) {}
 
-    public Cookie[] getCookies() { return null; }
     public String getHeader(String name) { return null; }
     public Collection<String> getHeaderNames() { return null; }
     public String[] getHeaderValues(@SuppressWarnings("unused") String name) {