hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Johnson <sjohn...@mercury.com>
Subject Set-Cookie: filtering on the path= verses URL path
Date Mon, 23 Aug 2004 20:54:44 GMT
Hi All,
 
We have a URL that works in IE and Netscape, but the cookie is not getting sent
from HTTPClient.
 
Here is the URL and the Set-Cookie
 
https://was4.hewitt.com/insightreporting/reports/websitemonitoring
<https://was4.hewitt.com/insightreporting/reports/websitemonitoring> 
 
response header has this:
 
Set-Cookie: JSESSIONID=0000CQL00NOE2OHVJFC5I3I5YRQ:v0c153k7;Path=/insight
 
The cookie path fails this logic in CookieSpecBase.java
 
    /**
     * Performs a path-match slightly smarter than a straight-forward startsWith
     * check.
     * @param path The path to check.
     * @param topmostPath The path to check against.
     * @return true if the paths match
     */
    private static boolean pathMatch(
        final String path, final String topmostPath) {
            
        boolean match = path.startsWith (topmostPath);     // Our example passes this
        
        // if there is a match and these values are not exactly the same we have
        // to make sure we're not matcing "/foobar" and "/foo"
        if (match && path.length() != topmostPath.length()) {
            if (!topmostPath.endsWith(PATH_DELIM)) {
                match = (path.charAt(topmostPath.length()) == PATH_DELIM_CHAR);  // Our example
fails this, we
want /foobar to match /foo
            }
        }
        return match;
    }
 
Is there a way to bypass this pathMatch() or specify another one?
 
Thanks,
Steve
 
Steve Johnson
Software Engineer
Mercury Interactive
720 564 - 6532
USA, Canada and the Americas 
720 564-6620
Hours: M-F 08:00-17:00 MST (Mountain Standard Time) 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 <http://www.mercuryinteractive.com> http://www.mercuryinteractive.com
Looking for Answers to your SiteScope or SiteSeer questions?        <http://support.mercuryinteractive.com>
http://support.mercuryinteractive.com
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 
 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message