curl-library
Suggesting CURLOPT_PATH_AS_IS
Date: Mon, 23 Mar 2015 13:01:25 +0100 (CET)
Hi friends,
As has been requested a few times, I'm hereby offering an option that allows
an application to switch off libcurl's "dedotdotify" function. That's the
function that squashes parts of the path that contain "/../ or "/./".
Normally a path in a URL that says "/moo/../hello" will be sent over the wire
as just "/hello". (This behavior was added to libcurl in 7.32.0) This handling
has been unconditional so far.
Attached is a (gzipped to make the test cases survive better) patch. I'll
welcome all and any comments, high or low.
CURLOPT_PATH_AS_IS: added
--path-as-is is the command line option
Added docs in curl.1 and CURLOPT_PATH_AS_IS.3
Added test in test 1241
docs/curl.1 | 6 ++++
docs/libcurl/opts/CURLOPT_PATH_AS_IS.3 | 63 +++++++++++++++++++++++++++++++++++++++
docs/libcurl/opts/Makefile.am | 26 ++++++++--------
include/curl/curl.h | 5 +++-
lib/url.c | 5 +++-
lib/urldata.h | 2 +-
src/tool_cfgable.h | 5 ++--
src/tool_getparam.c | 4 +++
src/tool_help.c | 1 +
src/tool_operate.c | 2 ++
tests/data/Makefile.inc | 2 +-
tests/data/test1241 | 64
++++++++++++++++++++++++++++++++++++++++
12 files changed, 165 insertions(+), 20 deletions(-)
-- / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
- APPLICATION/gzip attachment: 0001-CURLOPT_PATH_AS_IS-added.patch.gz