mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-22 20:06:49 +01:00
Improve multipart filename handling a bit.
This commit is contained in:
parent
75e8f68a24
commit
aaf744aad0
@ -197,10 +197,15 @@ void HTTPParser::_process_multipart_header_value(const String &val) {
|
|||||||
_multipart_form_name.remove(_multipart_form_name.length() - 1);
|
_multipart_form_name.remove(_multipart_form_name.length() - 1);
|
||||||
}
|
}
|
||||||
} else if (kk == "filename") {
|
} else if (kk == "filename") {
|
||||||
_multipart_form_filename = vs.get_slicec('=', 1);
|
|
||||||
_multipart_form_filename = _multipart_form_filename.replace("\"", "");
|
|
||||||
_multipart_form_is_file = true;
|
_multipart_form_is_file = true;
|
||||||
|
|
||||||
|
_multipart_form_filename = vs.get_slicec('=', 1);
|
||||||
|
|
||||||
|
if (_multipart_form_filename.length() >= 2 && _multipart_form_filename.begins_with("\"") && _multipart_form_filename.ends_with("\"")) {
|
||||||
|
_multipart_form_filename.remove(0);
|
||||||
|
_multipart_form_filename.remove(_multipart_form_filename.length() - 1);
|
||||||
|
}
|
||||||
|
|
||||||
if (_multipart_form_name.length() >= 2 && _multipart_form_name.begins_with("\"") && _multipart_form_name.ends_with("\"")) {
|
if (_multipart_form_name.length() >= 2 && _multipart_form_name.begins_with("\"") && _multipart_form_name.ends_with("\"")) {
|
||||||
_multipart_form_name.remove(0);
|
_multipart_form_name.remove(0);
|
||||||
_multipart_form_name.remove(_multipart_form_name.length() - 1);
|
_multipart_form_name.remove(_multipart_form_name.length() - 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user