public void setCharacterEncoding(String enc)\r
throws UnsupportedEncodingException {\r
\r
+ if (usingReader)\r
+ return;\r
+ \r
// Ensure that the specified encoding is valid\r
byte buffer[] = new byte[1];\r
buffer[0] = (byte) 'a';\r
Cookie cookie = new Cookie(Globals.SESSION_COOKIE_NAME,\r
session.getIdInternal());\r
configureSessionCookie(cookie);\r
- response.addCookie(cookie);\r
+ response.addCookieInternal(cookie);\r
}\r
\r
if (session != null) {\r
*/\r
public void addCookie(final Cookie cookie) {\r
\r
- if (isCommitted())\r
- return;\r
-\r
// Ignore any call from an included servlet\r
if (included)\r
return;\r
\r
+ addCookieInternal(cookie);\r
+\r
+ }\r
+\r
+\r
+ /**\r
+ * Add the specified Cookie to those that will be included with\r
+ * this Response.\r
+ *\r
+ * @param cookie Cookie to be added\r
+ */\r
+ public void addCookieInternal(final Cookie cookie) {\r
+\r
+ if (isCommitted())\r
+ return;\r
+\r
cookies.add(cookie);\r
\r
final StringBuffer sb = new StringBuffer();\r