Project

General

Profile

Actions

Bug #67893

closed

Content-type header not set for some file downloads

Added by Dennis Lümkemann over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2015-07-02
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.5
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

There is an MS Project file (.mpp) in my 6.2.14 FAL storage. When a user downloads this file (linked to via file links content element), the server response contains no Content-type header (like application/pdf - or in this case it should be application/vnd.msproject). As a result, the browser doesn't know how to handle the file and either shows the binary contents in a new window or saves to disk. Irritating to the end user and this way impossible to directly open the file in MS Project.
The Content-type header is set properly for more common file types like PDF, but in this case, there is no header.

In the backend (file list), the file is shown as type application/vnd.ms-office. So some detection is done here (finfo_file?). But this information never makes it into the HTTP headers.

Typo3 should use the content type / mime type information it already gets in the backend, to add a correct Content-type header. Alternatively/additionally, it would be useful to be able to manually define content-types based on file name extension, like it was done in EXT:dam in the past.

Actions

Also available in: Atom PDF