[
https://issues.apache.org/jira/browse/HTTPCLIENT-1810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15857106#comment-15857106
]
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_r99967058
--- 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 --
Hi garygregory,
s == null || "".equals(s) has been changed to TextUtils.isBlank(s), which
would be better. isn't it?
> 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]