From perezjason@example.org Thu Apr 01 00:10:51 2010 Return-Path: <perezjason@example.org> Delivered-To: perezjason@example.org Received: (qmail 15785 invoked from network); 1 Apr 2010 00:10:51 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 1 Apr 2010 00:10:51 -0000 Received: (qmail 60761 invoked by uid 500); 1 Apr 2010 00:10:51 -0000 Delivered-To: perezjason@example.org Received: (qmail 60630 invoked by uid 500); 1 Apr 2010 00:10:50 -0000 Mailing-List: contact perezjason@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:perezjason@example.org> List-Unsubscribe: <mailto:perezjason@example.org> List-Post: <mailto:perezjason@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <perezjason@example.org> Delivered-To: mailing list perezjason@example.org Received: (qmail 60622 invoked by uid 99); 1 Apr 2010 00:10:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Apr 2010 00:10:50 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Apr 2010 00:10:48 +0000 Received: from brutus.apache.org (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 3B974234C4B2 for <perezjason@example.org>; Thu, 1 Apr 2010 00:10:27 +0000 (UTC) Message-ID: <perezjason@example.org> Date: Thu, 1 Apr 2010 00:10:27 +0000 (UTC) From: "Ryan Stewart (JIRA)" <perezjason@example.org> To: perezjason@example.org Subject: [jira] Commented: (HTTPCLIENT-928) Can't get list of redirect locations In-Reply-To: <perezjason@example.org> 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-928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12852186#action_12852186 ] Ryan Stewart commented on HTTPCLIENT-928: ----------------------------------------- Yes, I did consider that. The DefaultRedirectHandler does everything almost exactly right, and it's not an easily extensible class. At a glance, the method it occurs in--getLocationURI--looks to have a complexity of about 20. It would be painful and unnecessary to duplicate and maintain all that code just for this one change. > Can't get list of redirect locations > ------------------------------------ > > Key: HTTPCLIENT-928 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-928 > Project: HttpComponents HttpClient > Issue Type: Improvement > Components: HttpClient > Affects Versions: 4.0.1 > Reporter: Ryan Stewart > > HttpClient does a great job of following redirects, but afterward there doesn't seem to be any way to see the URLs that it followed in the redirect chain. They are stored internally by the DefaultRedirectHandler in the HttpContext in an attribute named "http.protocol.redirect-locations", but the RedirectLocations object that contains them stores them in a Set, so there's no way of knowing in what order the URLs were visited. > Here's an example of why I need it: > 1) Use HttpClient to retrieve http://foo.com > 2) http://foo.com returns a 301 redirect to http://foo.com/bar, so HttpClient follows the redirect and returns the page to me > 3) http://foo.com/bar refers to a relative resource like "baz.html". > That relative resource should resolve to "http://foo.com/bar/baz.html". I only know that, though, if I can look at the redirect URL that HttpClient got in step 2. Currently, I don't seem to be able to do that. -- 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: perezjason@example.org For additional commands, e-mail: perezjason@example.org From perezjason@example.org Thu Apr 01 08:37:53 2010 Return-Path: <perezjason@example.org> Delivered-To: perezjason@example.org Received: (qmail 78323 invoked from network); 1 Apr 2010 08:37:53 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 1 Apr 2010 08:37:53 -0000 Received: (qmail 78372 invoked by uid 500); 1 Apr 2010 08:37:52 -0000 Delivered-To: perezjason@example.org Received: (qmail 78292 invoked by uid 500); 1 Apr 2010 08:37:50 -0000 Mailing-List: contact perezjason@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:perezjason@example.org> List-Unsubscribe: <mailto:perezjason@example.org> List-Post: <mailto:perezjason@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <perezjason@example.org> Delivered-To: mailing list perezjason@example.org Received: (qmail 78280 invoked by uid 99); 1 Apr 2010 08:37:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Apr 2010 08:37:49 +0000 X-ASF-Spam-Status: No, hits=-1191.9 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Apr 2010 08:37:47 +0000 Received: from brutus.apache.org (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 37762234C4B2 for <perezjason@example.org>; Thu, 1 Apr 2010 08:37:27 +0000 (UTC) Message-ID: <perezjason@example.org> Date: Thu, 1 Apr 2010 08:37:27 +0000 (UTC) From: "Oleg Kalnichevski (JIRA)" <perezjason@example.org> To: perezjason@example.org Subject: [jira] Commented: (HTTPCLIENT-928) Can't get list of redirect locations In-Reply-To: <perezjason@example.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HTTPCLIENT-928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12852288#action_12852288 ] Oleg Kalnichevski commented on HTTPCLIENT-928: ---------------------------------------------- There is absolutely no need to duplicate the functionality of DefaultRedirectHandler. What is wrong with just extending the class? --- DefaultHttpClient httpclient = new DefaultHttpClient(); RedirectHandler redirectHandler = new DefaultRedirectHandler() { public URI getLocationURI( final HttpResponse response, final HttpContext context) throws ProtocolException { URI uri = super.getLocationURI(response, context); System.out.println("----------------------------------------"); System.out.println("Redirected to: " + uri); System.out.println("----------------------------------------"); return uri; } }; httpclient.setRedirectHandler(redirectHandler); HttpHost target = new HttpHost("www.google.com", 80, "http"); HttpGet httpget = new HttpGet("/"); HttpResponse response = httpclient.execute(target, httpget); System.out.println("----------------------------------------"); System.out.println(response.getStatusLine()); System.out.println("----------------------------------------"); HttpEntity entity = response.getEntity(); if (entity != null) { entity.consumeContent(); } --- Oleg > Can't get list of redirect locations > ------------------------------------ > > Key: HTTPCLIENT-928 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-928 > Project: HttpComponents HttpClient > Issue Type: Improvement > Components: HttpClient > Affects Versions: 4.0.1 > Reporter: Ryan Stewart > > HttpClient does a great job of following redirects, but afterward there doesn't seem to be any way to see the URLs that it followed in the redirect chain. They are stored internally by the DefaultRedirectHandler in the HttpContext in an attribute named "http.protocol.redirect-locations", but the RedirectLocations object that contains them stores them in a Set, so there's no way of knowing in what order the URLs were visited. > Here's an example of why I need it: > 1) Use HttpClient to retrieve http://foo.com > 2) http://foo.com returns a 301 redirect to http://foo.com/bar, so HttpClient follows the redirect and returns the page to me > 3) http://foo.com/bar refers to a relative resource like "baz.html". > That relative resource should resolve to "http://foo.com/bar/baz.html". I only know that, though, if I can look at the redirect URL that HttpClient got in step 2. Currently, I don't seem to be able to do that. -- 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: perezjason@example.org For additional commands, e-mail: perezjason@example.org From perezjason@example.org Thu Apr 01 08:49:51 2010 Return-Path: <perezjason@example.org> Delivered-To: perezjason@example.org Received: (qmail 79719 invoked from network); 1 Apr 2010 08:49:51 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 1 Apr 2010 08:49:51 -0000 Received: (qmail 87272 invoked by uid 500); 1 Apr 2010 08:49:51 -0000 Delivered-To: perezjason@example.org Received: (qmail 87122 invoked by uid 500); 1 Apr 2010 08:49:49 -0000 Mailing-List: contact perezjason@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:perezjason@example.org> List-Unsubscribe: <mailto:perezjason@example.org> List-Post: <mailto:perezjason@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <perezjason@example.org> Delivered-To: mailing list perezjason@example.org Received: (qmail 87108 invoked by uid 99); 1 Apr 2010 08:49:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Apr 2010 08:49:48 +0000 X-ASF-Spam-Status: No, hits=-1192.0 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Apr 2010 08:49:47 +0000 Received: from brutus.apache.org (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 34AEE234C4B2 for <perezjason@example.org>; Thu, 1 Apr 2010 08:49:27 +0000 (UTC) Message-ID: <perezjason@example.org> Date: Thu, 1 Apr 2010 08:49:27 +0000 (UTC) From: "Oleg Kalnichevski (JIRA)" <perezjason@example.org> To: perezjason@example.org Subject: [jira] Commented: (HTTPCLIENT-928) Can't get list of redirect locations In-Reply-To: <perezjason@example.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HTTPCLIENT-928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12852291#action_12852291 ] Oleg Kalnichevski commented on HTTPCLIENT-928: ---------------------------------------------- What can be done pretty easily is changing the RedirectLocations class to use LinkedHashSet instead of HashSet, which would preserve the natural sequence of redirects. This, however, would not help with cyclic redirects. Another possibility would be to maintain a list of redirect locations in the RedirectLocations in addition to the set. Would that solve the problem for you? Oleg > Can't get list of redirect locations > ------------------------------------ > > Key: HTTPCLIENT-928 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-928 > Project: HttpComponents HttpClient > Issue Type: Improvement > Components: HttpClient > Affects Versions: 4.0.1 > Reporter: Ryan Stewart > > HttpClient does a great job of following redirects, but afterward there doesn't seem to be any way to see the URLs that it followed in the redirect chain. They are stored internally by the DefaultRedirectHandler in the HttpContext in an attribute named "http.protocol.redirect-locations", but the RedirectLocations object that contains them stores them in a Set, so there's no way of knowing in what order the URLs were visited. > Here's an example of why I need it: > 1) Use HttpClient to retrieve http://foo.com > 2) http://foo.com returns a 301 redirect to http://foo.com/bar, so HttpClient follows the redirect and returns the page to me > 3) http://foo.com/bar refers to a relative resource like "baz.html". > That relative resource should resolve to "http://foo.com/bar/baz.html". I only know that, though, if I can look at the redirect URL that HttpClient got in step 2. Currently, I don't seem to be able to do that. -- 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: perezjason@example.org For additional commands, e-mail: perezjason@example.org From perezjason@example.org Thu Apr 01 16:32:52 2010 Return-Path: <perezjason@example.org> Delivered-To: perezjason@example.org Received: (qmail 17465 invoked from network); 1 Apr 2010 16:32:52 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 1 Apr 2010 16:32:52 -0000 Received: (qmail 21284 invoked by uid 500); 1 Apr 2010 16:32:52 -0000 Delivered-To: perezjason@example.org Received: (qmail 21237 invoked by uid 500); 1 Apr 2010 16:32:51 -0000 Mailing-List: contact perezjason@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:perezjason@example.org> List-Unsubscribe: <mailto:perezjason@example.org> List-Post: <mailto:perezjason@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <perezjason@example.org> Delivered-To: mailing list perezjason@example.org Received: (qmail 21229 invoked by uid 99); 1 Apr 2010 16:32:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Apr 2010 16:32:51 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Apr 2010 16:32:48 +0000 Received: from brutus.apache.org (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 32194234C4BE for <perezjason@example.org>; Thu, 1 Apr 2010 16:32:27 +0000 (UTC) Message-ID: <perezjason@example.org> Date: Thu, 1 Apr 2010 16:32:27 +0000 (UTC) From: "Ryan Stewart (JIRA)" <perezjason@example.org> To: perezjason@example.org Subject: [jira] Commented: (HTTPCLIENT-928) Can't get list of redirect locations In-Reply-To: <perezjason@example.org> 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-928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12852438#action_12852438 ] Ryan Stewart commented on HTTPCLIENT-928: ----------------------------------------- Sorry, for some reason that approach to extending the DefaultRedirectHandler didn't occur to me. That should work, but I actually took the second approach you suggested. I extended RedirectLocations and overrode all of its methods to work off of a List of URIs instead of a Set. Then I injected my custom instance into the HttpContext before making the request. When the DefaultRedirectHandler handles a redirect, it looks for an existing RedirectLocations object first, so this worked. It isn't quite an ideal solution, though, since disabling HttpClient's circular redirect detection causes the RedirectLocations object to not be perezjason@example.org. Since I want to allow circular redirects but also track redirect URIs, I just overrode the RedirectLocations.contains() method to always return false. It works like this, but it's unintuitive. > Can't get list of redirect locations > ------------------------------------ > > Key: HTTPCLIENT-928 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-928 > Project: HttpComponents HttpClient > Issue Type: Improvement > Components: HttpClient > Affects Versions: 4.0.1 > Reporter: Ryan Stewart > > HttpClient does a great job of following redirects, but afterward there doesn't seem to be any way to see the URLs that it followed in the redirect chain. They are stored internally by the DefaultRedirectHandler in the HttpContext in an attribute named "http.protocol.redirect-locations", but the RedirectLocations object that contains them stores them in a Set, so there's no way of knowing in what order the URLs were visited. > Here's an example of why I need it: > 1) Use HttpClient to retrieve http://foo.com > 2) http://foo.com returns a 301 redirect to http://foo.com/bar, so HttpClient follows the redirect and returns the page to me > 3) http://foo.com/bar refers to a relative resource like "baz.html". > That relative resource should resolve to "http://foo.com/bar/baz.html". I only know that, though, if I can look at the redirect URL that HttpClient got in step 2. Currently, I don't seem to be able to do that. -- 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: perezjason@example.org For additional commands, e-mail: perezjason@example.org From perezjason@example.org Thu Apr 01 18:29:33 2010 Return-Path: <perezjason@example.org> Delivered-To: perezjason@example.org Received: (qmail 54570 invoked from network); 1 Apr 2010 18:29:33 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 1 Apr 2010 18:29:33 -0000 Received: (qmail 6300 invoked by uid 500); 1 Apr 2010 18:29:33 -0000 Delivered-To: perezjason@example.org Received: (qmail 6236 invoked by uid 500); 1 Apr 2010 18:29:33 -0000 Mailing-List: contact perezjason@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:perezjason@example.org> List-Unsubscribe: <mailto:perezjason@example.org> List-Post: <mailto:perezjason@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <perezjason@example.org> Delivered-To: mailing list perezjason@example.org Received: (qmail 6226 invoked by uid 99); 1 Apr 2010 18:29:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Apr 2010 18:29:33 +0000 X-ASF-Spam-Status: No, hits=-0.6 required=10.0 tests=AWL,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [83.161.120.155] (HELO ok2cons2.nine.ch) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Apr 2010 18:29:25 +0000 Received: from [83.161.120.155] +1-305-491-7637.dclient.hispeed.ch [83.161.120.155]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ok2cons2.nine.ch (Postfix) with ESMTPSA id E50074BA2E8; Thu, 1 Apr 2010 20:29:01 +0200 (CEST) Message-ID: <perezjason@example.org> Date: Thu, 01 Apr 2010 20:28:50 +0200 From: Oleg Kalnichevski <perezjason@example.org> User-Agent: Thunderbird 83.161.120.155 (Windows/20100228) MIME-Version: 1.0 To: HttpComponents Project <perezjason@example.org>, perezjason@example.org Subject: [VOTE][RESULT] HttpComponents Core 4.1-beta1 release Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit The vote to release HttpComponents Core 4.1-beta1 has passed with the following results +1 (4 binding votes in total) ant elder <antelder -at- apache.org> * Paul Fremantle <pzf -at- apache.org> * Asankha C. Perera <asankha -at- apache.org> * Oleg Kalnichevski <olegk -at- apache.org> * no other votes * binding votes Original voting thread: http://mail-archives.perezjason@example.org%3E --------------------------------------------------------------------- To unsubscribe, e-mail: perezjason@example.org For additional commands, e-mail: perezjason@example.org From perezjason@example.org Thu Apr 01 20:06:01 2010 Return-Path: <perezjason@example.org> Delivered-To: perezjason@example.org Received: (qmail 85771 invoked from network); 1 Apr 2010 20:06:01 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 1 Apr 2010 20:06:01 -0000 Received: (qmail 41401 invoked by uid 500); 1 Apr 2010 20:06:01 -0000 Delivered-To: perezjason@example.org Received: (qmail 41368 invoked by uid 500); 1 Apr 2010 20:06:01 -0000 Mailing-List: contact perezjason@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:perezjason@example.org> List-Unsubscribe: <mailto:perezjason@example.org> List-Post: <mailto:perezjason@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <perezjason@example.org> Delivered-To: mailing list perezjason@example.org Received: (qmail 41360 invoked by uid 99); 1 Apr 2010 20:06:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Apr 2010 20:06:01 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eos.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Apr 2010 20:05:58 +0000 Received: from eos.apache.org (localhost [83.161.120.155]) by eos.apache.org (Postfix) with ESMTP id 8C6D116E36 for <perezjason@example.org>; Thu, 1 Apr 2010 20:05:37 +0000 (GMT) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Apache Wiki <perezjason@example.org> To: Apache Wiki <perezjason@example.org> Date: Thu, 01 Apr 2010 20:05:37 -0000 Message-ID: <perezjason@example.org> Subject: =?utf-8?q?=5BHttpcomponents_Wiki=5D_Update_of_=22HttpComponentsCoreReleas?= =?utf-8?q?eProcess=22_by_OlegKalnichevski?= X-Virus-Checked: Checked by ClamAV on apache.org Dear Wiki user, You have subscribed to a wiki page or wiki category on "Httpcomponents Wiki= " for change notification. The "HttpComponentsCoreReleaseProcess" page has been changed by OlegKalnich= evski. http://wiki.apache.org/HttpComponents/HttpComponentsCoreReleaseProcess?acti= on=3Ddiff&rev1=3D19&rev2=3D20 -------------------------------------------------- * Deploy the site to a staging directory and review the resultant site b= efore committing the changes = = {{{ = - mvn clean clover2:aggregate site site:stage -Dmaven.clover.licenseLocatio= n=3D<path>/clover.license -DstagingDirectory=3D<path>/stage + mvn site site:stage -Dmaven.clover.licenseLocation=3D<path>/clover.licens= e -DstagingDirectory=3D<path>/stage }}} = You may need to re-build the site several times until fully satisfied wi= th its content and appearance @@ -341, +341 @@ * Build and deploy the site = {{{ - mvn clean clover2:aggregate site site:deploy -Dmaven.clover.licenseLocati= on=3D<path>/clover.license + mvn site-deploy -Dmaven.clover.licenseLocation=3D<path>/clover.license }}} = Remark: ASF committers can obtain a copy of Clover2 license donated to t= he ASF at this location=20 --------------------------------------------------------------------- To unsubscribe, e-mail: perezjason@example.org For additional commands, e-mail: perezjason@example.org From perezjason@example.org Fri Apr 02 13:48:49 2010 Return-Path: <perezjason@example.org> Delivered-To: perezjason@example.org Received: (qmail 22043 invoked from network); 2 Apr 2010 13:48:49 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 2 Apr 2010 13:48:49 -0000 Received: (qmail 18466 invoked by uid 500); 2 Apr 2010 13:48:48 -0000 Delivered-To: perezjason@example.org Received: (qmail 18438 invoked by uid 500); 2 Apr 2010 13:48:48 -0000 Mailing-List: contact perezjason@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:perezjason@example.org> List-Unsubscribe: <mailto:perezjason@example.org> List-Post: <mailto:perezjason@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <perezjason@example.org> Delivered-To: mailing list perezjason@example.org Received: (qmail 18429 invoked by uid 99); 2 Apr 2010 13:48:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Apr 2010 13:48:48 +0000 X-ASF-Spam-Status: No, hits=-1204.5 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Apr 2010 13:48:47 +0000 Received: from brutus.apache.org (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 70743234C4B2 for <perezjason@example.org>; Fri, 2 Apr 2010 13:48:27 +0000 (UTC) Message-ID: <perezjason@example.org> Date: Fri, 2 Apr 2010 13:48:27 +0000 (UTC) From: "Ryan Stewart (JIRA)" <perezjason@example.org> To: perezjason@example.org Subject: [jira] Created: (HTTPCLIENT-929) Request with two forward slashes for path fails MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Request with two forward slashes for path fails ----------------------------------------------- Key: HTTPCLIENT-929 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-929 Project: HttpComponents HttpClient Issue Type: Bug Components: HttpClient Affects Versions: 4.0.1 Reporter: Ryan Stewart The following code demonstrates the problem: {code} DefaultHttpClient client = new DefaultHttpClient(); client.execute(new HttpGet("http://www.google.com//")); {code} When a request is made, the DefaultRequestDirector invokes rewriteRequestURI(). I don't fully understand why this method does what it does. For a non-proxied request, it attempts to render the URI to a relative URI. In doing so, it tries to create a relative URI whose content is "//". Per RFC 2396 section 5 (Relative URI References), a relative URI that begins with "//" is a network-path reference, and the "//" must be immediately followed by an authority. Therefore, while "http://www.google.com//" is a valid absolute URI, "//" is not a valid relative one. The resulting exception: {noformat} [...] Caused by: org.apache.http.ProtocolException: Invalid URI: http://perezjason@example.org(DefaultRequestDirector.java:339) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:434) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641) ... 31 more Caused by: java.net.URISyntaxException: Expected authority at index 2: // at java.net.URI$Parser.fail(URI.java:2809) at java.net.URI$Parser.failExpecting(URI.java:2815) at java.net.URI$Parser.parseHierarchical(URI.java:3063) at java.net.URI$Parser.parse(URI.java:3024) at java.net.URI.<init>(URI.java:578) at org.apache.http.client.utils.URIUtils.createURI(URIUtils.java:106) at org.apache.http.client.utils.URIUtils.rewriteURI(URIUtils.java:141) at org.apache.http.client.utils.URIUtils.rewriteURI(URIUtils.java:159) at org.apache.http.impl.client.DefaultRequestDirector.rewriteRequestURI(DefaultRequestDirector.java:333) ... 33 more {noformat} -- 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: perezjason@example.org For additional commands, e-mail: perezjason@example.org From perezjason@example.org Fri Apr 02 13:50:56 2010 Return-Path: <perezjason@example.org> Delivered-To: perezjason@example.org Received: (qmail 24642 invoked from network); 2 Apr 2010 13:50:56 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 2 Apr 2010 13:50:56 -0000 Received: (qmail 20553 invoked by uid 500); 2 Apr 2010 13:50:55 -0000 Delivered-To: perezjason@example.org Received: (qmail 20524 invoked by uid 500); 2 Apr 2010 13:50:55 -0000 Mailing-List: contact perezjason@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:perezjason@example.org> List-Unsubscribe: <mailto:perezjason@example.org> List-Post: <mailto:perezjason@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <perezjason@example.org> Delivered-To: mailing list perezjason@example.org Received: (qmail 20516 invoked by uid 99); 2 Apr 2010 13:50:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Apr 2010 13:50:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Apr 2010 13:50:48 +0000 Received: from brutus.apache.org (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id B38FE234C48C for <perezjason@example.org>; Fri, 2 Apr 2010 13:50:27 +0000 (UTC) Message-ID: <perezjason@example.org> Date: Fri, 2 Apr 2010 13:50:27 +0000 (UTC) From: "Ryan Stewart (JIRA)" <perezjason@example.org> To: perezjason@example.org Subject: [jira] Updated: (HTTPCLIENT-929) Request with two forward slashes for path fails In-Reply-To: <perezjason@example.org> 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-929?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ryan Stewart updated HTTPCLIENT-929: ------------------------------------ Description: The following code demonstrates the problem: DefaultHttpClient client = new DefaultHttpClient(); client.execute(new HttpGet("http://www.google.com//")); When a request is made, the DefaultRequestDirector invokes rewriteRequestURI(). I don't fully understand why this method does what it does. For a non-proxied request, it attempts to render the URI to a relative URI. In doing so, it tries to create a relative URI whose content is "//". Per RFC 2396 section 5 (Relative URI References), a relative URI that begins with "//" is a network-path reference, and the "//" must be immediately followed by an authority. Therefore, while "http://www.google.com//" is a valid absolute URI, "//" is not a valid relative one. The resulting exception: [...] Caused by: org.apache.http.ProtocolException: Invalid URI: http://perezjason@example.org(DefaultRequestDirector.java:339) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:434) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641) ... 31 more Caused by: java.net.URISyntaxException: Expected authority at index 2: // at java.net.URI$Parser.fail(URI.java:2809) at java.net.URI$Parser.failExpecting(URI.java:2815) at java.net.URI$Parser.parseHierarchical(URI.java:3063) at java.net.URI$Parser.parse(URI.java:3024) at java.net.URI.<init>(URI.java:578) at org.apache.http.client.utils.URIUtils.createURI(URIUtils.java:106) at org.apache.http.client.utils.URIUtils.rewriteURI(URIUtils.java:141) at org.apache.http.client.utils.URIUtils.rewriteURI(URIUtils.java:159) at org.apache.http.impl.client.DefaultRequestDirector.rewriteRequestURI(DefaultRequestDirector.java:333) ... 33 more was: The following code demonstrates the problem: {code} DefaultHttpClient client = new DefaultHttpClient(); client.execute(new HttpGet("http://www.google.com//")); {code} When a request is made, the DefaultRequestDirector invokes rewriteRequestURI(). I don't fully understand why this method does what it does. For a non-proxied request, it attempts to render the URI to a relative URI. In doing so, it tries to create a relative URI whose content is "//". Per RFC 2396 section 5 (Relative URI References), a relative URI that begins with "//" is a network-path reference, and the "//" must be immediately followed by an authority. Therefore, while "http://www.google.com//" is a valid absolute URI, "//" is not a valid relative one. The resulting exception: {noformat} [...] Caused by: org.apache.http.ProtocolException: Invalid URI: http://perezjason@example.org(DefaultRequestDirector.java:339) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:434) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641) ... 31 more Caused by: java.net.URISyntaxException: Expected authority at index 2: // at java.net.URI$Parser.fail(URI.java:2809) at java.net.URI$Parser.failExpecting(URI.java:2815) at java.net.URI$Parser.parseHierarchical(URI.java:3063) at java.net.URI$Parser.parse(URI.java:3024) at java.net.URI.<init>(URI.java:578) at org.apache.http.client.utils.URIUtils.createURI(URIUtils.java:106) at org.apache.http.client.utils.URIUtils.rewriteURI(URIUtils.java:141) at org.apache.http.client.utils.URIUtils.rewriteURI(URIUtils.java:159) at org.apache.http.impl.client.DefaultRequestDirector.rewriteRequestURI(DefaultRequestDirector.java:333) ... 33 more {noformat} > Request with two forward slashes for path fails > ----------------------------------------------- > > Key: HTTPCLIENT-929 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-929 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: HttpClient > Affects Versions: 4.0.1 > Reporter: Ryan Stewart > > The following code demonstrates the problem: > DefaultHttpClient client = new DefaultHttpClient(); > client.execute(new HttpGet("http://www.google.com//")); > When a request is made, the DefaultRequestDirector invokes rewriteRequestURI(). I don't fully understand why this method does what it does. For a non-proxied request, it attempts to render the URI to a relative URI. In doing so, it tries to create a relative URI whose content is "//". Per RFC 2396 section 5 (Relative URI References), a relative URI that begins with "//" is a network-path reference, and the "//" must be immediately followed by an authority. Therefore, while "http://www.google.com//" is a valid absolute URI, "//" is not a valid relative one. The resulting exception: > [...] > Caused by: org.apache.http.ProtocolException: Invalid URI: http://www.google.com// > at org.apache.http.impl.client.DefaultRequestDirector.rewriteRequestURI(DefaultRequestDirector.java:339) > at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:434) > at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641) > ... 31 more > Caused by: java.net.URISyntaxException: Expected authority at index 2: // > at java.net.URI$Parser.fail(URI.java:2809) > at java.net.URI$Parser.failExpecting(URI.java:2815) > at java.net.URI$Parser.parseHierarchical(URI.java:3063) > at java.net.URI$Parser.parse(URI.java:3024) > at java.net.URI.<init>(URI.java:578) > at org.apache.http.client.utils.URIUtils.createURI(URIUtils.java:106) > at org.apache.http.client.utils.URIUtils.rewriteURI(URIUtils.java:141) > at org.apache.http.client.utils.URIUtils.rewriteURI(URIUtils.java:159) > at org.apache.http.impl.client.DefaultRequestDirector.rewriteRequestURI(DefaultRequestDirector.java:333) > ... 33 more -- 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: perezjason@example.org For additional commands, e-mail: perezjason@example.org From perezjason@example.org Fri Apr 02 14:00:50 2010 Return-Path: <perezjason@example.org> Delivered-To: perezjason@example.org Received: (qmail 35240 invoked from network); 2 Apr 2010 14:00:50 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 2 Apr 2010 14:00:50 -0000 Received: (qmail 64816 invoked by uid 500); 2 Apr 2010 13:00:50 -0000 Delivered-To: perezjason@example.org Received: (qmail 64760 invoked by uid 500); 2 Apr 2010 13:00:49 -0000 Mailing-List: contact perezjason@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:perezjason@example.org> List-Unsubscribe: <mailto:perezjason@example.org> List-Post: <mailto:perezjason@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <perezjason@example.org> Delivered-To: mailing list perezjason@example.org Received: (qmail 64752 invoked by uid 99); 2 Apr 2010 13:00:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Apr 2010 13:00:49 +0000 X-ASF-Spam-Status: No, hits=-1204.1 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Apr 2010 13:00:47 +0000 Received: from brutus.apache.org (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 37E44234C4BE for <perezjason@example.org>; Fri, 2 Apr 2010 13:00:27 +0000 (UTC) Message-ID: <perezjason@example.org> Date: Fri, 2 Apr 2010 13:00:27 +0000 (UTC) From: "Ryan Stewart (JIRA)" <perezjason@example.org> To: perezjason@example.org Subject: [jira] Commented: (HTTPCLIENT-928) Can't get list of redirect locations In-Reply-To: <perezjason@example.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HTTPCLIENT-928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12852803#action_12852803 ] Ryan Stewart commented on HTTPCLIENT-928: ----------------------------------------- Great! That will be a big help. I don't really know how the remove() method is used within HttpClient (is it used at all?), but is it a good idea to remove entries from the log? > Can't get list of redirect locations > ------------------------------------ > > Key: HTTPCLIENT-928 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-928 > Project: HttpComponents HttpClient > Issue Type: Improvement > Components: HttpClient > Affects Versions: 4.0.1 > Reporter: Ryan Stewart > > HttpClient does a great job of following redirects, but afterward there doesn't seem to be any way to see the URLs that it followed in the redirect chain. They are stored internally by the DefaultRedirectHandler in the HttpContext in an attribute named "http.protocol.redirect-locations", but the RedirectLocations object that contains them stores them in a Set, so there's no way of knowing in what order the URLs were visited. > Here's an example of why I need it: > 1) Use HttpClient to retrieve http://foo.com > 2) http://foo.com returns a 301 redirect to http://foo.com/bar, so HttpClient follows the redirect and returns the page to me > 3) http://foo.com/bar refers to a relative resource like "baz.html". > That relative resource should resolve to "http://foo.com/bar/baz.html". I only know that, though, if I can look at the redirect URL that HttpClient got in step 2. Currently, I don't seem to be able to do that. -- 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: perezjason@example.org For additional commands, e-mail: perezjason@example.org From perezjason@example.org Fri Apr 02 14:08:51 2010 Return-Path: <perezjason@example.org> Delivered-To: perezjason@example.org Received: (qmail 43111 invoked from network); 2 Apr 2010 14:08:51 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 2 Apr 2010 14:08:51 -0000 Received: (qmail 89143 invoked by uid 500); 2 Apr 2010 10:08:51 -0000 Delivered-To: perezjason@example.org Received: (qmail 89014 invoked by uid 500); 2 Apr 2010 10:08:49 -0000 Mailing-List: contact perezjason@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:perezjason@example.org> List-Unsubscribe: <mailto:perezjason@example.org> List-Post: <mailto:perezjason@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <perezjason@example.org> Delivered-To: mailing list perezjason@example.org Received: (qmail 88902 invoked by uid 99); 2 Apr 2010 10:08:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Apr 2010 10:08:48 +0000 X-ASF-Spam-Status: No, hits=-1203.4 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Apr 2010 10:08:47 +0000 Received: from brutus.apache.org (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 3EFA1234C4C8 for <perezjason@example.org>; Fri, 2 Apr 2010 10:08:27 +0000 (UTC) Message-ID: <perezjason@example.org> Date: Fri, 2 Apr 2010 10:08:27 +0000 (UTC) From: "Oleg Kalnichevski (JIRA)" <perezjason@example.org> To: perezjason@example.org Subject: [jira] Commented: (HTTPCLIENT-928) Can't get list of redirect locations In-Reply-To: <perezjason@example.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HTTPCLIENT-928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12852775#action_12852775 ] Oleg Kalnichevski commented on HTTPCLIENT-928: ---------------------------------------------- Ryan, I changed RedirectLocations to maintain an additional list of all redirect. Please take a look: http://svn.apache.org/viewvc?rev=930221&view=rev Oleg > Can't get list of redirect locations > ------------------------------------ > > Key: HTTPCLIENT-928 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-928 > Project: HttpComponents HttpClient > Issue Type: Improvement > Components: HttpClient > Affects Versions: 4.0.1 > Reporter: Ryan Stewart > > HttpClient does a great job of following redirects, but afterward there doesn't seem to be any way to see the URLs that it followed in the redirect chain. They are stored internally by the DefaultRedirectHandler in the HttpContext in an attribute named "http.protocol.redirect-locations", but the RedirectLocations object that contains them stores them in a Set, so there's no way of knowing in what order the URLs were visited. > Here's an example of why I need it: > 1) Use HttpClient to retrieve http://foo.com > 2) http://foo.com returns a 301 redirect to http://foo.com/bar, so HttpClient follows the redirect and returns the page to me > 3) http://foo.com/bar refers to a relative resource like "baz.html". > That relative resource should resolve to "http://foo.com/bar/baz.html". I only know that, though, if I can look at the redirect URL that HttpClient got in step 2. Currently, I don't seem to be able to do that. -- 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: perezjason@example.org For additional commands, e-mail: perezjason@example.org From perezjason@example.org Fri Apr 02 14:16:52 2010 Return-Path: <perezjason@example.org> Delivered-To: perezjason@example.org Received: (qmail 50489 invoked from network); 2 Apr 2010 14:16:52 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 2 Apr 2010 14:16:52 -0000 Received: (qmail 97630 invoked by uid 500); 2 Apr 2010 10:16:52 -0000 Delivered-To: perezjason@example.org Received: (qmail 97598 invoked by uid 500); 2 Apr 2010 10:16:50 -0000 Mailing-List: contact perezjason@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:perezjason@example.org> List-Unsubscribe: <mailto:perezjason@example.org> List-Post: <mailto:perezjason@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <perezjason@example.org> Delivered-To: mailing list perezjason@example.org Received: (qmail 97578 invoked by uid 99); 2 Apr 2010 10:16:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Apr 2010 10:16:48 +0000 X-ASF-Spam-Status: No, hits=-1203.5 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Apr 2010 10:16:47 +0000 Received: from brutus.apache.org (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id B3CB2234C4BE for <perezjason@example.org>; Fri, 2 Apr 2010 10:16:27 +0000 (UTC) Message-ID: <perezjason@example.org> Date: Fri, 2 Apr 2010 10:16:27 +0000 (UTC) From: "Oleg Kalnichevski (JIRA)" <perezjason@example.org> To: perezjason@example.org Subject: [jira] Resolved: (HTTPCLIENT-838) HttpClientConfigurator: configuration code for httpClient instance In-Reply-To: <1779125968.1238423810433.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HTTPCLIENT-838?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Oleg Kalnichevski resolved HTTPCLIENT-838. ------------------------------------------ Resolution: Won't Fix Fix Version/s: (was: 4.1 Alpha2) It's been almost a year since the last comment. Closing as WONTFIX. Oleg > HttpClientConfigurator: configuration code for httpClient instance > ------------------------------------------------------------------ > > Key: HTTPCLIENT-838 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-838 > Project: HttpComponents HttpClient > Issue Type: Improvement > Components: HttpClient > Reporter: Stojce Dimski > Attachments: config.zip, config2.zip > > > provide and interface and some sample implementation for the concept of HttpClient configurator. This component should contain configuration code for already created httpClient instance. For example: registering ntlm authentication scheme, configuration involved in ssl scenarios... This way httpClient instance is decoupled from configuration code... (see attachements :-) -- 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: perezjason@example.org For additional commands, e-mail: perezjason@example.org From perezjason@example.org Fri Apr 02 14:16:59 2010 Return-Path: <perezjason@example.org> Delivered-To: perezjason@example.org Received: (qmail 50553 invoked from network); 2 Apr 2010 14:16:59 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 2 Apr 2010 14:16:59 -0000 Received: (qmail 97973 invoked by uid 500); 2 Apr 2010 10:16:58 -0000 Delivered-To: perezjason@example.org Received: (qmail 97939 invoked by uid 500); 2 Apr 2010 10:16:58 -0000 Mailing-List: contact perezjason@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:perezjason@example.org> List-Unsubscribe: <mailto:perezjason@example.org> List-Post: <mailto:perezjason@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <perezjason@example.org> Delivered-To: mailing list perezjason@example.org Received: (qmail 97931 invoked by uid 99); 2 Apr 2010 10:16:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Apr 2010 10:16:58 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Apr 2010 10:16:48 +0000 Received: from brutus.apache.org (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id BFC0C234C4C6 for <perezjason@example.org>; Fri, 2 Apr 2010 10:16:27 +0000 (UTC) Message-ID: <perezjason@example.org> Date: Fri, 2 Apr 2010 10:16:27 +0000 (UTC) From: "Oleg Kalnichevski (JIRA)" <perezjason@example.org> To: perezjason@example.org Subject: [jira] Updated: (HTTPCLIENT-786) variables should be accessed through getters In-Reply-To: <302783500.1215725672055.JavaMail.jira@brutus> 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-786?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Oleg Kalnichevski updated HTTPCLIENT-786: ----------------------------------------- Fix Version/s: (was: 4.1 Alpha2) Future > variables should be accessed through getters > -------------------------------------------- > > Key: HTTPCLIENT-786 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-786 > Project: HttpComponents HttpClient > Issue Type: Improvement > Components: HttpClient > Affects Versions: 4.0 Alpha 4 > Reporter: Sam Berlin > Fix For: Future > > > Some attention should be placed on classes who shared their variables directly (as opposed to through a getter). This is sometimes OK for subclasses, but rarely good for other classes that use the objects. There's a small number of classes that have non-private variables, especially in the impl.conn & impl.conn.tsccm packages. > See HTTPCLIENT-745 . -- 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: perezjason@example.org For additional commands, e-mail: perezjason@example.org From perezjason@example.org Fri Apr 02 14:24:49 2010 Return-Path: <perezjason@example.org> Delivered-To: perezjason@example.org Received: (qmail 55626 invoked from network); 2 Apr 2010 14:24:48 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 2 Apr 2010 14:24:48 -0000 Received: (qmail 65956 invoked by uid 500); 2 Apr 2010 14:24:48 -0000 Delivered-To: perezjason@example.org Received: (qmail 65928 invoked by uid 500); 2 Apr 2010 14:24:48 -0000 Mailing-List: contact perezjason@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:perezjason@example.org> List-Unsubscribe: <mailto:perezjason@example.org> List-Post: <mailto:perezjason@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <perezjason@example.org> Delivered-To: mailing list perezjason@example.org Received: (qmail 65920 invoked by uid 99); 2 Apr 2010 14:24:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Apr 2010 14:24:48 +0000 X-ASF-Spam-Status: No, hits=-1204.8 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Apr 2010 14:24:47 +0000 Received: from brutus.apache.org (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 347A3234C48C for <perezjason@example.org>; Fri, 2 Apr 2010 14:24:27 +0000 (UTC) Message-ID: <perezjason@example.org> Date: Fri, 2 Apr 2010 14:24:27 +0000 (UTC) From: "Ryan Stewart (JIRA)" <perezjason@example.org> To: perezjason@example.org Subject: [jira] Created: (HTTPCLIENT-930) Unencoded redirect URI causes exception when following redirects MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Unencoded redirect URI causes exception when following redirects ---------------------------------------------------------------- Key: HTTPCLIENT-930 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-930 Project: HttpComponents HttpClient Issue Type: Bug Components: HttpClient Affects Versions: 4.0.1 Reporter: Ryan Stewart When HttpClient is set to follow redirects, the DefaultRedirectHandler gets the redirect location from the appropriate request header and attempts to create a new java.net.URI from it. If the location contains an invalid URI character, creating the URI fails. For example, if the redirect location were "/foo?bar=<baz/>", it would fail because the '<' and '>' are not legal in a URI. I'm not sure if this should actually be considered a bug in HttpClient, since the website in question should probably be responsible for encoding the URI appropriately; however, browsers handle the situation gracefully, and it would be nice if this excellent library would do so as well. -- 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: perezjason@example.org For additional commands, e-mail: perezjason@example.org From perezjason@example.org Fri Apr 02 14:41:33 2010 Return-Path: <perezjason@example.org> Delivered-To: perezjason@example.org Received: (qmail 67620 invoked from network); 2 Apr 2010 14:41:33 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 2 Apr 2010 14:41:33 -0000 Received: (qmail 43050 invoked by uid 500); 2 Apr 2010 09:14:53 -0000 Delivered-To: perezjason@example.org Received: (qmail 42459 invoked by uid 500); 2 Apr 2010 09:14:52 -0000 Mailing-List: contact perezjason@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:perezjason@example.org> List-Unsubscribe: <mailto:perezjason@example.org> List-Post: <mailto:perezjason@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <perezjason@example.org> Delivered-To: mailing list perezjason@example.org Received: (qmail 41844 invoked by uid 99); 2 Apr 2010 09:14:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Apr 2010 09:14:50 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Apr 2010 09:14:48 +0000 Received: from brutus.apache.org (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 469D7234C4C7 for <perezjason@example.org>; Fri, 2 Apr 2010 09:14:27 +0000 (UTC) Message-ID: <perezjason@example.org> Date: Fri, 2 Apr 2010 09:14:27 +0000 (UTC) From: "Oleg Kalnichevski (JIRA)" <perezjason@example.org> To: perezjason@example.org Subject: [jira] Commented: (HTTPCLIENT-898) Improve multihome support In-Reply-To: <515634042.1260441979382.JavaMail.jira@brutus> 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-898?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12852758#action_12852758 ] Oleg Kalnichevski commented on HTTPCLIENT-898: ---------------------------------------------- Steinar, I committed your patch to the 4.0.x branch in case Google decided to sync up its version with the ASF code line. Please review: http://svn.apache.org/viewvc?rev=930190&view=rev I will be working on a somewhat less hacky fix for the 4.1 release. Oleg > Improve multihome support > ------------------------- > > Key: HTTPCLIENT-898 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-898 > Project: HttpComponents HttpClient > Issue Type: Improvement > Components: HttpConn > Affects Versions: 4.0 Final, 4.0.1, 4.1 Alpha1 > Reporter: Oleg Kalnichevski > Fix For: 4.1 Alpha2 > > > MultihomePlainSocketFactory is basically broken and should be deprecated. Multihome logic needs to be moved to the DefaultClientConnectionOperator -- 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: perezjason@example.org For additional commands, e-mail: perezjason@example.org From perezjason@example.org Fri Apr 02 18:48:51 2010 Return-Path: <perezjason@example.org> Delivered-To: perezjason@example.org Received: (qmail 35672 invoked from network); 2 Apr 2010 18:48:51 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 2 Apr 2010 18:48:51 -0000 Received: (qmail 67486 invoked by uid 500); 2 Apr 2010 18:48:51 -0000 Delivered-To: perezjason@example.org Received: (qmail 67383 invoked by uid 500); 2 Apr 2010 18:48:51 -0000 Mailing-List: contact perezjason@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:perezjason@example.org> List-Unsubscribe: <mailto:perezjason@example.org> List-Post: <mailto:perezjason@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <perezjason@example.org> Delivered-To: mailing list perezjason@example.org Received: (qmail 67132 invoked by uid 99); 2 Apr 2010 18:48:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Apr 2010 18:48:51 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Apr 2010 18:48:48 +0000 Received: from brutus.apache.org (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 450DE234C48C for <perezjason@example.org>; Fri, 2 Apr 2010 18:48:27 +0000 (UTC) Message-ID: <perezjason@example.org> Date: Fri, 2 Apr 2010 18:48:27 +0000 (UTC) From: "Oleg Kalnichevski (JIRA)" <perezjason@example.org> To: perezjason@example.org Subject: [jira] Commented: (HTTPCLIENT-928) Can't get list of redirect locations In-Reply-To: <perezjason@example.org> 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-928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12852908#action_12852908 ] Oleg Kalnichevski commented on HTTPCLIENT-928: ---------------------------------------------- This method is not used anywhere in the HttpClient code. It has been introduced primarily for the sake of API completeness, just in case the class is re-used in another context. I think it is more logical to expect that URI instances get removed from the collection if the remove method is called. Most probably 'log' is just a misleading name. Oleg > Can't get list of redirect locations > ------------------------------------ > > Key: HTTPCLIENT-928 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-928 > Project: HttpComponents HttpClient > Issue Type: Improvement > Components: HttpClient > Affects Versions: 4.0.1 > Reporter: Ryan Stewart > > HttpClient does a great job of following redirects, but afterward there doesn't seem to be any way to see the URLs that it followed in the redirect chain. They are stored internally by the DefaultRedirectHandler in the HttpContext in an attribute named "http.protocol.redirect-locations", but the RedirectLocations object that contains them stores them in a Set, so there's no way of knowing in what order the URLs were visited. > Here's an example of why I need it: > 1) Use HttpClient to retrieve http://foo.com > 2) http://foo.com returns a 301 redirect to http://foo.com/bar, so HttpClient follows the redirect and returns the page to me > 3) http://foo.com/bar refers to a relative resource like "baz.html". > That relative resource should resolve to "http://foo.com/bar/baz.html". I only know that, though, if I can look at the redirect URL that HttpClient got in step 2. Currently, I don't seem to be able to do that. -- 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: perezjason@example.org For additional commands, e-mail: perezjason@example.org From perezjason@example.org Fri Apr 02 19:08:52 2010 Return-Path: <perezjason@example.org> Delivered-To: perezjason@example.org Received: (qmail 41403 invoked from network); 2 Apr 2010 19:08:52 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 2 Apr 2010 19:08:52 -0000 Received: (qmail 98965 invoked by uid 500); 2 Apr 2010 19:08:51 -0000 Delivered-To: perezjason@example.org Received: (qmail 98865 invoked by uid 500); 2 Apr 2010 19:08:51 -0000 Mailing-List: contact perezjason@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:perezjason@example.org> List-Unsubscribe: <mailto:perezjason@example.org> List-Post: <mailto:perezjason@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <perezjason@example.org> Delivered-To: mailing list perezjason@example.org Received: (qmail 98825 invoked by uid 99); 2 Apr 2010 19:08:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Apr 2010 19:08:51 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Apr 2010 19:08:48 +0000 Received: from brutus.apache.org (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id B8573234C4C7 for <perezjason@example.org>; Fri, 2 Apr 2010 19:08:27 +0000 (UTC) Message-ID: <perezjason@example.org> Date: Fri, 2 Apr 2010 19:08:27 +0000 (UTC) From: "Oleg Kalnichevski (JIRA)" <perezjason@example.org> To: perezjason@example.org Subject: [jira] Updated: (HTTPCLIENT-929) Request with two forward slashes for path fails In-Reply-To: <perezjason@example.org> 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-929?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Oleg Kalnichevski updated HTTPCLIENT-929: ----------------------------------------- Fix Version/s: 4.1 Alpha2 > When a request is made, the DefaultRequestDirector invokes rewriteRequestURI(). > I don't fully understand why this method does what it does DefaultRequestDirector rewrites the request URI in order to comply with the requirements of the RFC 2626 --- 5.1.2 Request-URI ... The most common form of Request-URI is that used to identify a resource on an origin server or gateway. In this case the absolute path of the URI MUST be transmitted (see section 3.2.1, abs_path) as the Request-URI, and the network location of the URI (authority) MUST be transmitted in a Host header field. For example, a client wishing to retrieve the resource above directly from the origin server would create a TCP connection to port 80 of the host "www.w3.org" and send the lines: GET /pub/WWW/TheProject.html HTTP/1.1 Host: www.w3.org --- The only thing that can be done about this problem is replacing multiple "/" in the abs_path with a single one. Would that solve the problem for you? Oleg > Request with two forward slashes for path fails > ----------------------------------------------- > > Key: HTTPCLIENT-929 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-929 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: HttpClient > Affects Versions: 4.0.1 > Reporter: Ryan Stewart > Fix For: 4.1 Alpha2 > > > The following code demonstrates the problem: > DefaultHttpClient client = new DefaultHttpClient(); > client.execute(new HttpGet("http://www.google.com//")); > When a request is made, the DefaultRequestDirector invokes rewriteRequestURI(). I don't fully understand why this method does what it does. For a non-proxied request, it attempts to render the URI to a relative URI. In doing so, it tries to create a relative URI whose content is "//". Per RFC 2396 section 5 (Relative URI References), a relative URI that begins with "//" is a network-path reference, and the "//" must be immediately followed by an authority. Therefore, while "http://www.google.com//" is a valid absolute URI, "//" is not a valid relative one. The resulting exception: > [...] > Caused by: org.apache.http.ProtocolException: Invalid URI: http://www.google.com// > at org.apache.http.impl.client.DefaultRequestDirector.rewriteRequestURI(DefaultRequestDirector.java:339) > at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:434) > at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641) > ... 31 more > Caused by: java.net.URISyntaxException: Expected authority at index 2: // > at java.net.URI$Parser.fail(URI.java:2809) > at java.net.URI$Parser.failExpecting(URI.java:2815) > at java.net.URI$Parser.parseHierarchical(URI.java:3063) > at java.net.URI$Parser.parse(URI.java:3024) > at java.net.URI.<init>(URI.java:578) > at org.apache.http.client.utils.URIUtils.createURI(URIUtils.java:106) > at org.apache.http.client.utils.URIUtils.rewriteURI(URIUtils.java:141) > at org.apache.http.client.utils.URIUtils.rewriteURI(URIUtils.java:159) > at org.apache.http.impl.client.DefaultRequestDirector.rewriteRequestURI(DefaultRequestDirector.java:333) > ... 33 more -- 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: perezjason@example.org For additional commands, e-mail: perezjason@example.org From perezjason@example.org Fri Apr 02 19:32:49 2010 Return-Path: <perezjason@example.org> Delivered-To: perezjason@example.org Received: (qmail 45668 invoked from network); 2 Apr 2010 19:32:49 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 2 Apr 2010 19:32:49 -0000 Received: (qmail 22494 invoked by uid 500); 2 Apr 2010 19:32:48 -0000 Delivered-To: perezjason@example.org Received: (qmail 22459 invoked by uid 500); 2 Apr 2010 19:32:48 -0000 Mailing-List: contact perezjason@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:perezjason@example.org> List-Unsubscribe: <mailto:perezjason@example.org> List-Post: <mailto:perezjason@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <perezjason@example.org> Delivered-To: mailing list perezjason@example.org Received: (qmail 22451 invoked by uid 99); 2 Apr 2010 19:32:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Apr 2010 19:32:48 +0000 X-ASF-Spam-Status: No, hits=-1207.1 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Apr 2010 19:32:47 +0000 Received: from brutus.apache.org (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id ADD3B234C1EF for <perezjason@example.org>; Fri, 2 Apr 2010 19:32:27 +0000 (UTC) Message-ID: <perezjason@example.org> Date: Fri, 2 Apr 2010 19:32:27 +0000 (UTC) From: "Oleg Kalnichevski (JIRA)" <perezjason@example.org> To: perezjason@example.org Subject: [jira] Commented: (HTTPCLIENT-930) Unencoded redirect URI causes exception when following redirects In-Reply-To: <perezjason@example.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HTTPCLIENT-930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12852929#action_12852929 ] Oleg Kalnichevski commented on HTTPCLIENT-930: ---------------------------------------------- We had similar reports in the past and they all were rejected as invalid, see HTTPCLIENT-778 for example. I am also not sure the way browsers handle this kind of problems can be defined as graceful. I _suspect_ that browsers simply use the good ol' principle of garbage in - garbage out and do not even attempt to escape redirect urls. What theoretically can be done about is the following: the abs_path and query parts of the redirect URI are scanned for illegal characters and if any is found the entire URI is considered un-escaped. This of course does not help if you have situations like that: /garbage%20in%20garbage%20?param={screw you all}. Bottom line: malformed request URIs are inherently ambiguous and there is nothing that can be done about it. Oleg > Unencoded redirect URI causes exception when following redirects > ---------------------------------------------------------------- > > Key: HTTPCLIENT-930 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-930 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: HttpClient > Affects Versions: 4.0.1 > Reporter: Ryan Stewart > > When HttpClient is set to follow redirects, the DefaultRedirectHandler gets the redirect location from the appropriate request header and attempts to create a new java.net.URI from it. If the location contains an invalid URI character, creating the URI fails. For example, if the redirect location were "/foo?bar=<baz/>", it would fail because the '<' and '>' are not legal in a URI. > I'm not sure if this should actually be considered a bug in HttpClient, since the website in question should probably be responsible for encoding the URI appropriately; however, browsers handle the situation gracefully, and it would be nice if this excellent library would do so as well. -- 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: perezjason@example.org For additional commands, e-mail: perezjason@example.org From perezjason@example.org Sat Apr 03 03:35:52 2010 Return-Path: <perezjason@example.org> Delivered-To: perezjason@example.org Received: (qmail 29475 invoked from network); 3 Apr 2010 03:35:52 -0000 Received: from unknown (HELO mail.apache.org) (83.161.120.155) by 83.161.120.155 with SMTP; 3 Apr 2010 03:35:52 -0000 Received: (qmail 75228 invoked by uid 500); 3 Apr 2010 03:35:52 -0000 Delivered-To: perezjason@example.org Received: (qmail 75047 invoked by uid 500); 3 Apr 2010 03:35:52 -0000 Mailing-List: contact perezjason@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:perezjason@example.org> List-Unsubscribe: <mailto:perezjason@example.org> List-Post: <mailto:perezjason@example.org> List-Id: <dev.hc.apache.org> Reply-To: "HttpComponents Project" <perezjason@example.org> Delivered-To: mailing list perezjason@example.org Received: (qmail 75039 invoked by uid 99); 3 Apr 2010 03:35:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Apr 2010 03:35:51 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Apr 2010 03:35:48 +0000 Received: from brutus.apache.org (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 8257F234C1EF for <perezjason@example.org>; Sat, 3 Apr 2010 03:35:27 +0000 (UTC) Message-ID: <perezjason@example.org> Date: Sat, 3 Apr 2010 03:35:27 +0000 (UTC) From: "Ryan Stewart (JIRA)" <perezjason@example.org> To: perezjason@example.org Subject: [jira] Commented: (HTTPCLIENT-929) Request with two forward slashes for path fails In-Reply-To: <perezjason@example.org> 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-929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12853069#action_12853069 ] Ryan Stewart commented on HTTPCLIENT-929: ----------------------------------------- Yes, I think that's the right approach. The problem should only happen when the path is composed of nothing but two or more slashes, but it should also be safe to replace any series of multiple slashes with a single one. Alternately, while I was looking into it, I discovered that URI has a relativize method that works like so: URI uri1 = URI.create("http://www.google.com/foo"); URI uri2 = URI.create("http://www.google.com").relativize(uri1); Final content of uri2: path="foo". When you tell it to relativize "http://www.google.com//", you get an empty URI, which is accurate. Could you just use this instead of reconstructing the URI manually? > Request with two forward slashes for path fails > ----------------------------------------------- > > Key: HTTPCLIENT-929 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-929 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: HttpClient > Affects Versions: 4.0.1 > Reporter: Ryan Stewart >
{'source': 'Apache Software Foundation Public Mail Archives'}