Fix #1212
This commit is contained in:
parent
7fb0254794
commit
a1df576e4f
@ -3752,10 +3752,11 @@ public:
|
|||||||
bool parse(const char *buf, size_t n, const ContentReceiver &content_callback,
|
bool parse(const char *buf, size_t n, const ContentReceiver &content_callback,
|
||||||
const MultipartContentHeader &header_callback) {
|
const MultipartContentHeader &header_callback) {
|
||||||
|
|
||||||
|
// TODO: support 'filename*'
|
||||||
static const std::regex re_content_disposition(
|
static const std::regex re_content_disposition(
|
||||||
"^Content-Disposition:\\s*form-data;\\s*name=\"(.*?)\"(?:;\\s*filename="
|
R"~(^Content-Disposition:\s*form-data;\s*name="(.*?)"(?:;\s*filename="(.*?)")?(?:;\s*filename\*=\S+)?\s*$)~",
|
||||||
"\"(.*?)\")?\\s*$",
|
|
||||||
std::regex_constants::icase);
|
std::regex_constants::icase);
|
||||||
|
|
||||||
static const std::string dash_ = "--";
|
static const std::string dash_ = "--";
|
||||||
static const std::string crlf_ = "\r\n";
|
static const std::string crlf_ = "\r\n";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user