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