You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Stanley Hillner (JIRA)" <ji...@apache.org> on 2014/06/16 11:27:01 UTC
[jira] [Created] (HTTPCLIENT-1516) URL-encoded form paramters -
missing '=' for null-values
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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org