Return-Path: Delivered-To: apmail-hc-dev-archive@www.apache.org Received: (qmail 31185 invoked from network); 14 Jan 2011 13:55:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Jan 2011 13:55:14 -0000 Received: (qmail 42255 invoked by uid 500); 14 Jan 2011 13:55:14 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 42056 invoked by uid 500); 14 Jan 2011 13:55:11 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 42048 invoked by uid 99); 14 Jan 2011 13:55:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Jan 2011 13:55:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Jan 2011 13:55:08 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id p0EDsk3S014796 for ; Fri, 14 Jan 2011 13:54:46 GMT Message-ID: <8120939.368541295013286144.JavaMail.jira@thor> Date: Fri, 14 Jan 2011 08:54:46 -0500 (EST) From: "Oleg Kalnichevski (JIRA)" To: dev@hc.apache.org Subject: [jira] Updated: (HTTPCLIENT-1043) BasicPathHandler match bug In-Reply-To: <13742605.367601295008186081.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HTTPCLIENT-1043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Oleg Kalnichevski updated HTTPCLIENT-1043: ------------------------------------------ Component/s: (was: HttpClient) HttpCookie Priority: Minor (was: Critical) Dmitry Could you please produce a complete wire log of the HTTP session that exhibits the problem? You might also want to add a test case to the HttpClient test suite [1] that demonstrates the problem. Oleg [1] http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/httpclient/src/test/java/org/apache/http/impl/cookie/TestCookieRFC2109Spec.java > BasicPathHandler match bug > -------------------------- > > Key: HTTPCLIENT-1043 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1043 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: HttpCookie > Affects Versions: 4.0.1, 4.0.2, 4.0.3, 4.1 Alpha1, 4.1 Alpha2, 4.1 Beta1 > Reporter: Dmitry Grytsovets > Priority: Minor > Fix For: 4.1.0, Future > > > in BasicPathHandler > boolean match = targetpath.startsWith (topmostPath); > // 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 && targetpath.length() != topmostPath.length()) { > if (!topmostPath.endsWith("/")) { > match = (targetpath.charAt(topmostPath.length()) == '/'); > } > } > must be changed to > boolean match = topmostPath.startsWith (targetpath); > // 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 && targetpath.length() != topmostPath.length()) { > if (!targetPath.endsWith("/")) { > match = (topmostPath.charAt(targetpath.length()-1) == '/'); > } > } > example > targetpath = "/stat/" // where are you > topmostPath = "/stat/domain.tld/" // cookie for path -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org