Return-Path: Delivered-To: apmail-jakarta-commons-httpclient-dev-archive@www.apache.org Received: (qmail 80010 invoked from network); 23 Aug 2004 20:58:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 23 Aug 2004 20:58:38 -0000 Received: (qmail 36384 invoked by uid 500); 23 Aug 2004 20:58:37 -0000 Delivered-To: apmail-jakarta-commons-httpclient-dev-archive@jakarta.apache.org Received: (qmail 36355 invoked by uid 500); 23 Aug 2004 20:58:36 -0000 Mailing-List: contact commons-httpclient-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Commons HttpClient Project" Reply-To: "Commons HttpClient Project" Delivered-To: mailing list commons-httpclient-dev@jakarta.apache.org Received: (qmail 34040 invoked by uid 99); 23 Aug 2004 20:56:08 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE,MIME_HTML_NO_CHARSET X-Spam-Check-By: apache.org X-VirusChecked: Checked X-Env-Sender: sjohnson@mercury.com X-Msg-Ref: server-25.tower-15.messagelabs.com!1093294556!5581183 X-StarScan-Version: 5.2.10; banners=-,-,- X-Originating-IP: [64.242.155.19] Message-ID: From: Steve Johnson To: "'commons-httpclient-dev@jakarta.apache.org'" Subject: Set-Cookie: filtering on the path= verses URL path Date: Mon, 23 Aug 2004 13:54:44 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C48953.6AB02A7C" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C48953.6AB02A7C Content-Type: text/plain 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 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 Looking for Answers to your SiteScope or SiteSeer questions? http://support.mercuryinteractive.com ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ------_=_NextPart_001_01C48953.6AB02A7C--