[
https://issues.apache.org/jira/browse/HTTPCLIENT-1810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15857092#comment-15857092
]
ASF GitHub Bot commented on HTTPCLIENT-1810:
--------------------------------------------
Github user Coderec commented on a diff in the pull request:
https://github.com/apache/httpclient/pull/64#discussion_r99964842
--- Diff:
httpclient/src/main/java/org/apache/http/client/utils/URIBuilder.java ---
@@ -492,8 +492,8 @@ public String toString() {
private static String normalizePath(final String path) {
String s = path;
- if (s == null) {
- return "/";
+ if (s == null || "".equals(s)) {
+ return "";
--- End diff --
I just didn't want to import new dependences such as
apache.commons.lang3.StringUtils, when I didn't notice TextUtils. I will use
TextUtils, thanks for recommending.
> URIBuilder.toString() always adds '/' to path, even with query parameters
> -------------------------------------------------------------------------
>
> Key: HTTPCLIENT-1810
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1810
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Affects Versions: 4.5.3
> Reporter: Osvaldo Pinali Doederlein
>
> I get results like this:
> http://a.io:999/?p1=v1&p2=v2
> previously, it was correct
> http://a.io:999?p1=v1&p2=v2
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]