diff options
| author | JimmyZ <jimmy.z.z@gmail.com> | 2016-12-28 00:44:46 +0800 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2016-12-31 14:11:12 +0900 |
| commit | da730478af0cdae2936053d6f9789cee12c95b7d (patch) | |
| tree | 8c5d9621ec62c5dc49413d899b8a4001abb69706 /src/util.h | |
| parent | f542f84b836b1fd89d89537155ea7e25e07f49be (diff) | |
new option content-disposition-default-utf8
Diffstat (limited to 'src/util.h')
| -rw-r--r-- | src/util.h | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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); |
