Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Respect explicitly set Content-Type in sendFile #1642
Currently when using sendFile, the Content-Type header is automatically set based on file extension. While this default behaviour is fine, the problem is that the header is overwritten if already explicitly set.
In my case, files are not stored using any extension, so all files are treated as application/octet-stream. I have the correct media type stored elsewhere, and it would be nice if I could manually specify this, without having the header overwritten internally.