Expected behavior
A protected asset should be delivered with the correct Content-Type header after one included the example code for the MyAssetController class from https://pimcore.com/docs/pimcore/10.6/Development_Documentation/Assets/Restricting_Public_Asset_Access.html#page_Option-2-Checking-permissions-before-delivery
Actual behavior
The Content-Type header is hard coded as application/pdf. It should be $asset->getMimeType() in order to match the delivered asset MimeType
Steps to reproduce
- Implement the solution documented in https://pimcore.com/docs/pimcore/10.6/Development_Documentation/Assets/Restricting_Public_Asset_Access.html#page_Option-2-Checking-permissions-before-delivery
- Upload any non-pdf asset in the protected folder
- Authenticate and open the public link
- The Content-Type says 'application/pdf'