summaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorJimmyZ <jimmy.z.z@gmail.com>2016-12-28 00:44:46 +0800
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2016-12-31 14:11:12 +0900
commitda730478af0cdae2936053d6f9789cee12c95b7d (patch)
tree8c5d9621ec62c5dc49413d899b8a4001abb69706 /src/util.h
parentf542f84b836b1fd89d89537155ea7e25e07f49be (diff)
new option content-disposition-default-utf8
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/util.h b/src/util.h
index 76ecb549..2fc8ca40 100644
--- a/src/util.h
+++ b/src/util.h
@@ -322,11 +322,15 @@ std::string iso8859p1ToUtf8(const std::string& src);
// succeeds, or -1. If there is enough room to store filename in
// |dest|, this function returns -1. If this function returns -1, the
// |dest|, |*charsetp| and |*charsetlenp| are undefined.
+//
+// It will handle quoted string(as in RFC 7230 section 3.2.6) as
+// ISO-8859-1 by default, or UTF-8 if defaultUTF8 == true.
ssize_t parse_content_disposition(char* dest, size_t destlen,
const char** charsetp, size_t* charsetlenp,
- const char* in, size_t len);
+ const char* in, size_t len, bool defaultUTF8);
-std::string getContentDispositionFilename(const std::string& header);
+std::string getContentDispositionFilename(const std::string& header,
+ bool defaultUTF8);
std::string toUpper(std::string src);