This question is a bit weird. Given that I do not have access to the Apache server, I want to check if an Apache web server is using proper MIME type to handle specific file format, such as image/jpeg
for .jpg
files.
As MIME is shown in HTTP response, for example:
accept-ranges:bytes
alt-svc:quic=":443"; ma=2592000; v="39,38,37,35"
cache-control:private, max-age=31536000
content-length:16786
content-type:image/jpeg <---
date:Mon, 21 Aug 2017 09:56:08 GMT
expires:Mon, 21 Aug 2017 09:56:08 GMT
last-modified:Wed, 14 Dec 2016 20:30:00 GMT
server:sffe
status:200
x-content-type-options:nosniff
x-xss-protection:1; mode=block
If a web server is configured incorrectly, for example adding:
AddHandler application/x-httpd-php .jpg
in .htaccess
or in Apache configuration file, I would like to use HTTP request to diagnose. Is it possible? Will the Apache server responded with application/x-httpd-php
when I'm requesting a .jpg
from the server?
You can do curl -I http://yoursite.com/test.jpg
which will give you the content-type in return along with other info.