Przekazywanie adresu URL z nawiasami do curl

Jeśli spróbuję przekazać adres URL do curl, który zawiera nawiasy, nie powiedzie się z błędem:

$ curl 'http://www.google.com/?TEST[]=1'
curl: (3) [globbing] illegal character in range specification at pos 29

Jednakże, jeśli ucieknę z obu nawiasów, wydaje się, że działa:

$ curl 'http://www.google.com/?TEST\[\]=1'

Co ciekawe, używam ukośnika wstecznego, aby uciec tylko pierwszy nawias nie powiedzie się po cichu z kodem błędu 20497:

$ curl 'http://www.google.com/?TEST\[]=1'
$ echo $!
20497
Moje pytanie brzmi, jak to naprawić w sprawach ogólnych? Czy istnieje argument, który automatycznie usunie adresy URL, lub opis znaków, które muszą zostać przerwane przed przekazaniem zwijać?
 241
Author: webster, 2011-12-01

1 answers

Nevermind, I found it in the docs:

-g/--globoff
              This  option  switches  off  the "URL globbing parser". When you set this option, you can
              specify URLs that contain the letters {}[] without having them being interpreted by  curl
              itself.  Note  that  these  letters  are not normal legal URL contents but they should be
              encoded according to the URI standard.
 376
Author: chaimp,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2011-11-30 22:37:42