use content_type "name" attribute as attachment file name if there is no content_disposition "filename" attribute
This commit is contained in:
parent
675d2e586d
commit
a71de8895f
1 changed files with 6 additions and 1 deletions
|
@ -507,6 +507,11 @@ void MimeHandlerMail::walkmime(Binc::MimePart* doc, int depth)
|
||||||
it = content_disposition.params.find(string("filename"));
|
it = content_disposition.params.find(string("filename"));
|
||||||
if (it != content_disposition.params.end())
|
if (it != content_disposition.params.end())
|
||||||
filename = it->second;
|
filename = it->second;
|
||||||
|
if (filename.empty()) {
|
||||||
|
it = content_type.params.find(string("name"));
|
||||||
|
if (it != content_type.params.end())
|
||||||
|
filename = it->second;
|
||||||
|
}
|
||||||
|
|
||||||
if (doc->isMessageRFC822()) {
|
if (doc->isMessageRFC822()) {
|
||||||
LOGDEB2(("walkmime: message/RFC822 part\n"));
|
LOGDEB2(("walkmime: message/RFC822 part\n"));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue