Stanley Hillner created HTTPCLIENT-1516:
-------------------------------------------
Summary: 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.3.4, 4.3.3, 4.3.2, 4.2.6, 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]