Telling cUrl not to normalize a url
When using curl to call some url, it simplifies the path in the url (for example from /a/../b
to /b
). How can I tell cUrl not to do so?
$ curl -V
curl 7.35.0 (x86_64-pc-linux-gnu) libcurl/7.35.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP
$ curl -v 'localhost/a/../b'
* Rebuilt URL to: localhost/b
Pass the --path-as-is
flag:
$ curl --path-as-is 'http://localhost/a/../b'