php-cross-domain-proxy icon indicating copy to clipboard operation
php-cross-domain-proxy copied to clipboard

Encoded URL in X-Proxy-URL

Open janoskaz opened this issue 6 years ago • 0 comments

I have trouble retrieving data using encoded url.

curl correctly retrieves data, if I urlencode whitespaces: curl "http://birds.cz:8080/v1/eshop/messages?public=true&where=Active%20is%20true%20and%20Code%20is%20'ESHOP_MSG'"

But proxy server returns nothing, whether I encode url in header or not. The same goes for csurl parameter.

// not encoded
curl -v -H "X-Proxy-URL: http://birds.cz:8080/v1/eshop/messages?public=true&where=Active is true and Code is 'ESHOP_MSG'" http://myproxy.com/proxy.php

// fully encoded
curl -v -H "X-Proxy-URL: http%3A%2F%2Fbirds.cz%3A8080%2Fv1%2Feshop%2Fmessages%3Fpublic%3Dtrue%26where%3DActive%20is%20true%20and%20Code%20is%20%27ESHOP_MSG%27" http://myproxy.com/proxy.php

// encoded only whitespaces
curl -v -H "X-Proxy-URL: http://birds.cz:8080/v1/eshop/messages?public=true&where=Active%20is%20true%20and%20Code%20is%20'ESHOP_MSG'" http://myproxy.com/proxy.php

janoskaz avatar Dec 17 '17 11:12 janoskaz