aboutsummaryrefslogtreecommitdiff
path: root/lib/dotdot.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2013-06-15 23:47:02 +0200
committerDaniel Stenberg <daniel@haxx.se>2013-06-22 14:15:07 +0200
commit7877619f856a04af0519e92780b1d6674a8ff3f7 (patch)
tree6b1c1f0c5ef5761494be6d5d2851a6c196917898 /lib/dotdot.h
parentec248b590df3ac2e6873ea9c7507eff8e5044825 (diff)
dotdot: introducing dot file path cleanup
RFC3986 details how a path part passed in as part of a URI should be "cleaned" from dot sequences before getting used. The described algorithm is now implemented in lib/dotdot.c with the accompanied test case in test 1395. Bug: http://curl.haxx.se/bug/view.cgi?id=1200 Reported-by: Alex Vinnik
Diffstat (limited to 'lib/dotdot.h')
-rw-r--r--lib/dotdot.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/dotdot.h b/lib/dotdot.h
new file mode 100644
index 000000000..c3487c137
--- /dev/null
+++ b/lib/dotdot.h
@@ -0,0 +1,25 @@
+#ifndef HEADER_CURL_DOTDOT_H
+#define HEADER_CURL_DOTDOT_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at http://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+char *Curl_dedotdotify(char *input);
+#endif