Update of /cvsroot/freenet/freenet/src/freenet/support/servlet/http
In directory sc8-pr-cvs1:/tmp/cvs-serv17801

Modified Files:
        HttpSupport.java 
Log Message:
Fix exception in parseCookie:

java.lang.StringIndexOutOfBoundsException: String index out of range

Couldn't test this because I don't know how to cause it to be called,
but the change is trivial enough.


Index: HttpSupport.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/support/servlet/http/HttpSupport.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -r1.3 -r1.4
--- HttpSupport.java    30 Oct 2003 01:34:06 -0000      1.3
+++ HttpSupport.java    20 Nov 2003 17:07:27 -0000      1.4
@@ -59,8 +59,12 @@
             String is = st.nextToken();
             int j = s.indexOf('=');
             if (j != -1) {
+               if (j == is.length()) {
+                   h.put(is.substring(0, j).trim().toLowerCase(), "");
+               } else {
                 h.put(is.substring(0, j).trim().toLowerCase(),
                       is.substring(j +1).trim());
+               }
             }
         }
         

_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to