0
这个问题有点奇怪。鉴于我无法访问Apache服务器,我想检查Apache Web服务器是否使用适当的MIME类型来处理特定的文件格式,例如image/jpeg
的.jpg
文件。可能使用HTTP请求来探测Apache设置中配置的MIME?
作为MIME示于HTTP响应,例如:
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
如果Web服务器配置不正确,例如添加:
AddHandler application/x-httpd-php .jpg
在.htaccess
或在Apache配置文件,我想要使用HTTP请求进行诊断。可能吗?当我向服务器请求.jpg
时,Apache服务器会用application/x-httpd-php
做出回应吗?
不错。更好的是,'curl -sI http://yoursite.com/test.jpg | grep“Content-Type”只输出Content-Type行。 – Raptor