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 F26EDC149 for ; Mon, 25 Jun 2012 19:31:45 +0000 (UTC) Received: (qmail 6113 invoked by uid 500); 25 Jun 2012 19:31:45 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 6088 invoked by uid 500); 25 Jun 2012 19:31:45 -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 6078 invoked by uid 99); 25 Jun 2012 19:31:45 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jun 2012 19:31:45 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 2662114283D for ; Mon, 25 Jun 2012 19:31:45 +0000 (UTC) Date: Mon, 25 Jun 2012 19:31:45 +0000 (UTC) From: "Oleg Kalnichevski (JIRA)" To: dev@hc.apache.org Message-ID: <2027252577.52668.1340652705159.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1571721388.5102.1338002543377.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (HTTPCLIENT-1195) URIBuilder-created query strings are double-escaped 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-1195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13400809#comment-13400809 ] Oleg Kalnichevski commented on HTTPCLIENT-1195: ----------------------------------------------- Truth to be told I mostly relied on the content of the java.net.URI javadocs. Feel free to re-factor the class to follow the structure of RFC 2396 more closely. Oleg > URIBuilder-created query strings are double-escaped > --------------------------------------------------- > > Key: HTTPCLIENT-1195 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1195 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: HttpClient > Affects Versions: 4.2 Final > Environment: java version "1.6.0_24" > OpenJDK Runtime Environment (IcedTea6 1.11.1) (6b24-1.11.1-4ubuntu3) > OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode) > Reporter: Chris K. Jester-Young > Fix For: 4.2.1 > > Attachments: HTTPCLIENT-1195-2.patch, HTTPCLIENT-1195.patch > > > When setting parameters in URIBuilder, the keys and values are double-escaped: once in URIBuilder.build(), and again in URI.appendSchemeSpecificPart(). Example: > URIBuilder ub = new URIBuilder("http://www.google.com/"); > ub.addParameter("foo=bar", "baz&qux"); > ub.build(); // http://www.google.com/?foo%253Dbar=baz%2526qux > In order to avoid this problem, URIBuilder.build() should use URI's one-argument constructor, which does not try to do extra escaping. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa 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