Using BURP to send a
OPTIONS * HTTP/1.0
request to Sun Web Server 7.0 returns:
HTTP/1.1 200 OK
Server: Sun-Java-System-Web-Server/7.0
Date: Wed, 03 Feb 2010 01:05:14 GMT
Allow: HEAD, GET, PUT, POST, DELETE, TRACE, OPTIONS, MOVE, INDEX, MKDIR, RMDIR, COPY, CONNECT, PROPFIND, PROPPATCH, MKCOL, LOCK, UNLOCK, ACL, REPORT, VERSION-CONTROL, CHECKOUT, CHECKIN, UNCHECKOUT, MKWORKSPACE, UPDATE, LABEL, MERGE, BASELINE-CONTROL, MKACTIVITY, SEARCH, SUBSCRIBE, UNSUBSCRIBE, NOTIFY, POLL, BDELETE, BCOPY, BMOVE, BPROPPATCH, BPROPFIND
and to GlassFish Enterprise Server v2.1 returns :
HTTP/1.1 200 OK
X-Powered-By: Servlet/2.5
Server: Sun GlassFish Enterprise Server v2.1
Allow: GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS
Date: Wed, 03 Feb 2010 01:10:10 GMT
I would like to trim the HTTP options supported on both servers to something like:
Allow: GET, HEAD, POST, PUT
How to I configure both servers in order to implement this?
Some research gave the following:
Change the obj.conf file in the config directory of the web server instance (i.e. not the admin-server config directory) and add the "If" below.
This tells the server to respond to such requests with a 501 error.
The actual response is: