$_SERVER['QUERY_STRING'] plus-signs and whitespace

smallfish smallfish.xy at gmail.com
Wed Dec 11 11:55:56 UTC 2013


'+' in url equla ' ' (base64). if value has '+', you must encode it.

example:
$a = "1+1";
echo urlencode($a);

the correct url is: "http://x.com/?test=1%2B1"

--
smallfish http://chenxiaoyu.org


On Wed, Dec 11, 2013 at 6:19 PM, basti <black.fledermaus at arcor.de> wrote:

>  Hello,
> I have the following Problem with Nginx 1.2.1-2.2
> running on 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2 x86_64 GNU/Linux
>
> A String like $_SERVER['QUERY_STRING'] = test=1+2 will get $_GET['test']
> = 1 2
> I have found the following:
>
>  $_GET["q"] = strtr($_GET["q"], "+", " ");
>  at
> http://www.dmuth.org/node/1268/how-get-rid-annoying-plus-signs-drupal-under-nginx
>
> Is there a way to do this, in nginx config?
>
> Regards,
> basti
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20131211/183ffe03/attachment.html>


More information about the nginx mailing list