I'm having problems with the cookie parsing

Cookie: $Version="1"; name1="value1"; $Path="/testcookies"; $Domain="localhost"

Specifically
Cookies.java - line 490
if( bytes[valueStart] =='1' && valueEnd == valueStart) {

since the version is one character, then valueEnd should be valueStart+1, valueEnd==valueStart would mean 0 bytes

patch would be
Index: java/org/apache/tomcat/util/http/Cookies.java
===================================================================
--- java/org/apache/tomcat/util/http/Cookies.java    (revision 589807)
+++ java/org/apache/tomcat/util/http/Cookies.java    (working copy)
@@ -487,7 +487,7 @@
                if (equals( "Version", bytes, nameStart, nameEnd) &&
                    sc == null) {
                    // Set version
- if( bytes[valueStart] =='1' && valueEnd == valueStart) { + if( bytes[valueStart] =='1' && valueEnd == (valueStart+1)) {
                        version=1;
                    } else {
                        // unknown version (Versioning is not very strict)


This bug would break the TCK
Filip



Rémy Maucherat wrote:
The candidates binaries are available here:
http://people.apache.org/~remm/tomcat-6/v6.0.15/

According to the release process, the 6.0.15 tag is:
[X] Broken
[ ] Alpha
[ ] Beta
[ ] Stable

Rémy



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to