You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! A bit stumped. I'm using lithium\net\http\Request class and trying to build a request like such:
http://www.test.com/test.php?type=0
When I create the Request with a "query" array with a key of "type" and value of "0" though, the URL sent to curl ends up being just http://www.test.com/test.php.
Digging through the code I found the culprit: the query array is being filtered with array_filter in the queryString method, which removes all query parameters with falsy values! Thus a query parameter containing a single string character of "0" is stripped out.
Is this a bug? Any recommendations on how to work around it?
Thanks!
The text was updated successfully, but these errors were encountered:
At a first look I can't see why the query string is being filtered (even multiple times). The above tests don't seem to cover that case, so I'm tempted to assume we can remove the filtering altogether.
I'd need your help on this: can you try and verify that assumption? Maybe even provide a patch that fixes this seemingly strange behavior?
Hello! A bit stumped. I'm using lithium\net\http\Request class and trying to build a request like such:
http://www.test.com/test.php?type=0
When I create the Request with a "query" array with a key of "type" and value of "0" though, the URL sent to curl ends up being just
http://www.test.com/test.php
.Digging through the code I found the culprit: the query array is being filtered with
array_filter
in thequeryString
method, which removes all query parameters with falsy values! Thus a query parameter containing a single string character of "0" is stripped out.Is this a bug? Any recommendations on how to work around it?
Thanks!
The text was updated successfully, but these errors were encountered: