[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-1516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14033744#comment-14033744
 ] 

Stanley Hillner commented on HTTPCLIENT-1516:
---------------------------------------------

bq. Allow me to disagree.
You may ;)

bq. If my memory serves me well it was done to be able to distinguish empty and 
null parameter values.
Ok, I guess you want to distinguish these cases to provide a kind of 
flagging-behavior for queries, such as http://...?debug which would advise the 
servlet to print out debugging information?!
You are right, the specs doesn't handle those different cases (null-value, 
empty value, ...) but I'm still of the opinion that a null-value is equal to 
just omitting the parameter key from the query ;)

Thanks for the replies!

> 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]

Reply via email to