From tomcat-dev-return-28398-apmail-jakarta-tomcat-dev-archive=jakarta.apache.org@jakarta.apache.org Mon Sep 24 22:08:54 2001 Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 26057 invoked by uid 500); 24 Sep 2001 22:08:53 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: tomcat-dev@jakarta.apache.org Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 26042 invoked from network); 24 Sep 2001 22:08:53 -0000 Date: 24 Sep 2001 22:09:00 -0000 Message-ID: <20010924220900.17717.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: tomcat-dev@jakarta.apache.org Cc: Subject: DO NOT REPLY [Bug 3799] New: - Setting null cookie value throws exception X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3799 Setting null cookie value throws exception Summary: Setting null cookie value throws exception Product: Tomcat 4 Version: 4.0 Final Platform: All OS/Version: All Status: NEW Severity: Critical Priority: Other Component: Catalina AssignedTo: tomcat-dev@jakarta.apache.org ReportedBy: bill@jivesoftware.com The standard way to delete a cookie is to set the cookie's value to null then re-add the cookie to the response: <% // Cookie test Cookie cookie = new Cookie("foo",null); // add cookie response.addCookie(cookie); %> This results in a NullPointerException because Tomcat tries to URLEncode a null value. The ability to delete a cookie is a critical necessity as it will prevent most webapps that use cookies from working correctly.