Return-Path: X-Original-To: apmail-hc-dev-archive@www.apache.org Delivered-To: apmail-hc-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 860B310F73 for ; Fri, 23 Aug 2013 19:49:59 +0000 (UTC) Received: (qmail 94104 invoked by uid 500); 23 Aug 2013 19:49:59 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 92370 invoked by uid 500); 23 Aug 2013 19:49:57 -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 91622 invoked by uid 99); 23 Aug 2013 19:49:54 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Aug 2013 19:49:54 +0000 Date: Fri, 23 Aug 2013 19:49:53 +0000 (UTC) From: "Saurabh Kr Singh (JIRA)" To: dev@hc.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HTTPCLIENT-1392) CLONE - redirect error! java.net.URISyntaxException: Illegal character 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-1392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13748929#comment-13748929 ] Saurabh Kr Singh commented on HTTPCLIENT-1392: ---------------------------------------------- Thanks Job for responding. I can understand that it may be a server problem but then how browsers as a client are able to handle this and not httpclient (though I accept that ot has limited set of capacity compared to a full fledged browser). I can I configure something in httpclient to get results is what I was looking at. And if its a server issue then does that mean that redirect URL should never contain doubly byte characters ? Oleg, Its you opinion if you consider this as waste of time to respond. I already subscribed as per you advice but my e-mail was moderated just because it probably had link to this JIRA issue. I mentioned this in one of my comments as well if you read carefully (which obviously you did not bother to as you seem to be interested only in keeping open issue counts low). You are pretty quick and interested in closing the issue but take it as a pain to respond. Its kind of refraining from the responsibility you have on yourself. I did enough research from my end and I mentioned my findings in my comments as well. I guess you did not spend any effort/time in replying to the issue (anyone can see how quick you were in closing the issue/responding only when it was open). > CLONE - redirect error! java.net.URISyntaxException: Illegal character > ------------------------------------------------------------------------ > > Key: HTTPCLIENT-1392 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1392 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: HttpClient > Environment: centos6.2 > jdk1.6u25 > Reporter: Saurabh Kr Singh > > ==========Test.java===================== > HttpClient client = new DefaultHttpClient(); > HttpGet get = new HttpGet("http://localhost:8080/T/Test"); > client.execute(get); > client.getConnectionManager().shutdown(); > ==========TestServlet.java============================= > protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { > response.sendRedirect("/xx?name=||dsdf&user=||"); > } > =============================================== > Throws an exception when I run. > Exception in thread "main" org.apache.http.client.ClientProtocolException > at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:909) > at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805) > at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:784) > at com.Test.main(Test.java:20) > Caused by: org.apache.http.ProtocolException: Invalid redirect URI: http://localhost:8080/xx?name=||dsdf&user=|| > at org.apache.http.impl.client.DefaultRedirectStrategy.createLocationURI(DefaultRedirectStrategy.java:189) > at org.apache.http.impl.client.DefaultRedirectStrategy.getLocationURI(DefaultRedirectStrategy.java:140) > at org.apache.http.impl.client.DefaultRedirectStrategy.getRedirect(DefaultRedirectStrategy.java:209) > at org.apache.http.impl.client.DefaultRequestDirector.handleResponse(DefaultRequestDirector.java:1070) > at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:546) > at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906) > ... 3 more > Caused by: java.net.URISyntaxException: Illegal character in query at index 30: http://localhost:8080/xx?name=||dsdf&user=|| > at java.net.URI$Parser.fail(URI.java:2810) > at java.net.URI$Parser.checkChars(URI.java:2983) > at java.net.URI$Parser.parseHierarchical(URI.java:3073) > at java.net.URI$Parser.parse(URI.java:3015) > at java.net.URI.(URI.java:577) > at org.apache.http.impl.client.DefaultRedirectStrategy.createLocationURI(DefaultRedirectStrategy.java:187) > ... 8 more -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org