We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7fb0254 commit a1df576Copy full SHA for a1df576
httplib.h
@@ -3752,10 +3752,11 @@ class MultipartFormDataParser {
3752
bool parse(const char *buf, size_t n, const ContentReceiver &content_callback,
3753
const MultipartContentHeader &header_callback) {
3754
3755
+ // TODO: support 'filename*'
3756
static const std::regex re_content_disposition(
- "^Content-Disposition:\\s*form-data;\\s*name=\"(.*?)\"(?:;\\s*filename="
3757
- "\"(.*?)\")?\\s*$",
+ R"~(^Content-Disposition:\s*form-data;\s*name="(.*?)"(?:;\s*filename="(.*?)")?(?:;\s*filename\*=\S+)?\s*$)~",
3758
std::regex_constants::icase);
3759
+
3760
static const std::string dash_ = "--";
3761
static const std::string crlf_ = "\r\n";
3762
0 commit comments