[
https://issues.apache.org/jira/browse/HTTPCLIENT-1516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14033632#comment-14033632
]
Stanley Hillner commented on HTTPCLIENT-1516:
---------------------------------------------
Ok, but I think it would be a more stable implementation to add the '=' even if
there is no value present for the parameter. Even if the undertow web server
has already fixed this issue on server side, this problem could affect other
web servers as well.
Just for interest: what was the reason this null-check had been added for
version 4.2?
> URL-encoded form paramters - missing '=' for null-values
> --------------------------------------------------------
>
> Key: HTTPCLIENT-1516
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1516
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient
> Affects Versions: 4.2.6, 4.3.2, 4.3.3, 4.3.4, 4.3.5
> Reporter: Stanley Hillner
>
> If you pass {{null}} as the value for a post parameter and use URL-encoded
> form parameters the Method
> {{org.apache.http.client.utils.URLEncodedUtils#format}} omits the separator
> character ({{=}}) for this parameter which results in urls like the following.
> {{http://example.org/test?a=1&b&c=2}}
> In this case parameter {{b}} was assigned {{null}} as its value.
> It is not totally clear if the key/value separator character must be present
> even if the value is omitted (RFC 1738 doesn't handle this case) but this
> implementation leads to incompatibilities to other systems.
> I encountered this issue with httpclient 4.2.1 on the one side and undertow
> web server shipped with Wildfly 8.0.0.Final.
> I also opened an issue for undertow just to clarify the correct handling of
> null-values for url-parameters: [https://issues.jboss.org/browse/UNDERTOW-258]
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]