tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 44679] Cookies are treated differently between 6.0.16 and 6.0.14
Date Fri, 10 Oct 2008 16:25:07 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=44679


Tim Funk <funkman@joedog.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED




--- Comment #22 from Tim Funk <funkman@joedog.org>  2008-10-10 09:25:07 PST ---
simple wrappers to strip = and \n (tweak to accurately use your own
BASE64Encoder class)

    public static String decodeBase64(String s) {
        switch(s.length()%4) {
            case 3:
                s+= "==="; break;
            case 2:
                s+= "=="; break;
            case 1:
                s+= "="; break;
            default:
        }
        return new BASE64Encoder().decode(s.getBytes())););
    }

    public static String encodeBase64(String s) {
        String encoded = BASE64Encoder().encode(s.getBytes())));
        return encoded.replaceAll("[\n=]", "");
    }


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message