1CURLOPT_PATH_AS_IS(3)      curl_easy_setopt options      CURLOPT_PATH_AS_IS(3)
2
3
4

NAME

6       CURLOPT_PATH_AS_IS - do not handle dot dot sequences
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode   curl_easy_setopt(CURL   *handle,   CURLOPT_PATH_AS_IS,  long
12       leaveit);
13

DESCRIPTION

15       Set the long leaveit to 1, to explicitly tell libcurl to not alter  the
16       given path before passing it on to the server.
17
18       This  instructs libcurl to NOT squash sequences of "/../" or "/./" that
19       may exist in the URL's path part and that is  supposed  to  be  removed
20       according to RFC 3986 section 5.2.4.
21
22       Some  server implementations are known to (erroneously) require the dot
23       dot sequences to remain in the path and some clients want to pass these
24       on in order to try out server implementations.
25
26       By default libcurl will merge such sequences before using the path.
27

DEFAULT

29       0
30

PROTOCOLS

32       All
33

EXAMPLE

35       CURL *curl = curl_easy_init();
36       if(curl) {
37         curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/../../etc/password");
38
39         curl_easy_setopt(curl, CURLOPT_PATH_AS_IS, 1L);
40
41         curl_easy_perform(curl);
42       }
43

AVAILABILITY

45       Added in 7.42.0
46

RETURN VALUE

48       Returns  CURLE_OK  if the option is supported, and CURLE_UNKNOWN_OPTION
49       if not.
50

SEE ALSO

52       CURLOPT_STDERR(3), CURLOPT_DEBUGFUNCTION(3), CURLOPT_URL(3),
53
54
55
56libcurl 7.69.1                September 23, 2018         CURLOPT_PATH_AS_IS(3)
Impressum