Moaj'ns,
auf einem GNU/Linux (64bit) habe ich mir einen Apache 2.2.0 kompiliert und scheitere nun daran die HTTP-Methoden zu beschränken. In der httpd.conf habe ich folgendes aufgenommen:
<Directory />
Options FollowSymLinks
AllowOverride None
Order Deny,Allow
Deny from all
<LimitExcept GET>
Order Deny,Allow
Deny from all
</LimitExcept>
</Directory>
Bei einem Apache 1.3.x führt ein POST-Request bei dieser Konfiguration zu etwa folgendem Response-Header:
HTTP/1.1 403 Forbidden
Date: Fri, 20 Jan 2006 20:55:12 GMT
Server: Apache
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1
Korrekter wäre zwar eine Status 405, aber das eigentliche Ziel - Abbruch der Anfrageverarbeitung - wird erreicht.
Leider nicht beim neuen Apache 2.2.0:
HTTP/1.1 200 OK
Date: Fri, 20 Jan 2006 20:58:23 GMT
Server: Apache
Vary: Accept-Encoding
Content-Length: 1201
Connection: close
Content-Type: text/html; charset=iso-8859-1
Per Post übergebene Daten werden dennoch an Scripte weitergereicht, auch ein OPTIONS-Request zeigt, daß die Konfiguration zum Teil keine Wirkung entfaltet:
HTTP/1.1 200 OK
Date: Fri, 20 Jan 2006 21:03:09 GMT
Server: Apache
Vary: Accept-Encoding
Content-Length: 1425
Connection: close
Content-Type: text/html; charset=iso-8859-1
Es wird also kein "Allow" gesendet, aber Status 200 ist mir jedenfalls nicht "OK".
Folgende Module sind eingebunden:
core_module (static)
authn_file_module (static)
authn_default_module (static)
authz_host_module (static)
authz_groupfile_module (static)
authz_user_module (static)
auth_basic_module (static)
auth_digest_module (static)
dumpio_module (static)
include_module (static)
deflate_module (static)
log_config_module (static)
logio_module (static)
expires_module (static)
headers_module (static)
setenvif_module (static)
ssl_module (static)
mpm_worker_module (static)
http_module (static)
mime_module (static)
dav_module (static)
dav_fs_module (static)
negotiation_module (static)
dir_module (static)
alias_module (static)
so_module (static)
php5_module (shared)
Weiß jemand Rat, oder ist von einem Bug auszugehen?
Gruß aus Berlin!
eddi