Bug 453573

Summary: some pdf, by default opened with kate instead of okular
Product: [Applications] kmail2 Reporter: Philippe ROUBACH <philippe.roubach>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: REPORTED ---    
Severity: normal CC: nicolas.fella
Priority: NOR    
Version: 5.20.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: the mail with the pdf

Description Philippe ROUBACH 2022-05-09 10:55:20 UTC
Created attachment 148671 [details]
the mail with the pdf

SUMMARY
***
some jointed pdf are by default opened by kate
***


STEPS TO REPRODUCE
1. click on pdf
2. 
3. 

OBSERVED RESULT

kate opens the pdf

EXPECTED RESULT

okular opens the pdf

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.2
kde gear 20.04.0

ADDITIONAL INFORMATION

If I display the properties of the PDF, I get "Type : text/plain" .
Comment 1 Nicolas Fella 2022-05-10 08:50:02 UTC
KMail reads the file type from the message data. The relevant part of the mbox file is

--_f1fdcbb7f3b911688bff11751fa7d1a8
Content-Type: {"application/octet-stream"};
 name="certificat_1-A8T121_20220509122829.pdf"
Content-Disposition: attachment;
 filename="certificat_1-A8T121_20220509122829.pdf"
Content-Transfer-Encoding: base64

When I manually change it to 

Content-Type: application/octet-stream

it works as expected