Andre- apache has implemented method handling by hardcoded parameters in /include/httpd.h #define M_GET 0 /* RFC 2616: HTTP */ #define M_PUT 1 /* : */ #define M_POST 2 #define M_DELETE 3 #define M_CONNECT 4 #define M_OPTIONS 5 #define M_TRACE 6 /* RFC 2616: HTTP */ #define M_PATCH 7 /* no rfc(!) ### remove this one? */ #define M_PROPFIND 8 /* RFC 2518: WebDAV */ #define M_PROPPATCH 9 /* : */ #define M_MKCOL 10 #define M_COPY 11 #define M_MOVE 12 #define M_LOCK 13 #define M_UNLOCK 14 /* RFC 2518: WebDAV */ #define M_VERSION_CONTROL 15 /* RFC 3253: WebDAV Versioning */ #define M_CHECKOUT 16 /* : */ #define M_UNCHECKOUT 17 #define M_CHECKIN 18 #define M_UPDATE 19 #define M_LABEL 20 #define M_REPORT 21 #define M_MKWORKSPACE 22 #define M_MKACTIVITY 23 #define M_BASELINE_CONTROL 24 #define M_MERGE 25 #define M_INVALID 26 /* RFC 3253: WebDAV Versioning */
where the modules/http/http_protocol.c binds each of the aforementioned methods AP_DECLARE(void) ap_method_registry_init(apr_pool_t *p) { methods_registry = apr_hash_make(p); apr_pool_cleanup_register(p, NULL, ap_method_registry_destroy, apr_pool_cleanup_null); /* put all the standard methods into the registry hash to ease the mapping operations between name and number */ register_one_method(p, "GET", M_GET); register_one_method(p, "PUT", M_PUT); register_one_method(p, "POST", M_POST); register_one_method(p, "DELETE", M_DELETE); register_one_method(p, "CONNECT", M_CONNECT); register_one_method(p, "OPTIONS", M_OPTIONS); register_one_method(p, "TRACE", M_TRACE); register_one_method(p, "PATCH", M_PATCH); register_one_method(p, "PROPFIND", M_PROPFIND); register_one_method(p, "PROPPATCH", M_PROPPATCH); register_one_method(p, "MKCOL", M_MKCOL); register_one_method(p, "COPY", M_COPY); register_one_method(p, "MOVE", M_MOVE); register_one_method(p, "LOCK", M_LOCK); register_one_method(p, "UNLOCK", M_UNLOCK); register_one_method(p, "VERSION-CONTROL", M_VERSION_CONTROL); register_one_method(p, "CHECKOUT", M_CHECKOUT); register_one_method(p, "UNCHECKOUT", M_UNCHECKOUT); register_one_method(p, "CHECKIN", M_CHECKIN); register_one_method(p, "UPDATE", M_UPDATE); register_one_method(p, "LABEL", M_LABEL); register_one_method(p, "REPORT", M_REPORT); register_one_method(p, "MKWORKSPACE", M_MKWORKSPACE); register_one_method(p, "MKACTIVITY", M_MKACTIVITY); register_one_method(p, "BASELINE-CONTROL", M_BASELINE_CONTROL); register_one_method(p, "MERGE", M_MERGE); } //even if you comment out these hardcoded method assignments you still have to put a patch in for /modules/generators/mod_cgi.c static int log_script(request_rec *r, cgi_server_conf * conf, int ret, char *dbuf, const char *sbuf, apr_bucket_brigade *bb, apr_file_t *script_err) ...... if ((r->method_number == M_POST || r->method_number == M_PUT) && *dbuf) { apr_file_printf(f, "\n%s\n", dbuf); } ..... ping me offline as this is definitely not related to TC but allows one to compare requisite functionality between TC and Apache Martin ______________________________________________ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Fri, 19 Jun 2009 08:20:47 +0200 > From: a...@ice-sa.com > To: users@tomcat.apache.org > Subject: Re: Sample program for testing http DELETE or PUT method in tomcat > > cleegt wrote: > > Dear All, > > > > Because of the security reason imposed by my company, I disabled http > > DELETE, PUT methods from the tomcat based on some suggested method mentioned > > on the internet. Now, I need to test whether the fix is working or not. So, > > I am looking for a sample testing program to test the DELETE and PUT > > methods. Is there anyone know where I can find those programs? > > > If perl is installed on your system (and otherwise just install it), > look at the lwp-request program. > > lwp-request -m (method) URL > > There are a bunch of options that will allow you to see the request > content and response details. > > I'm sure there's also a couple of utilities Unix/Linux-side which do > similar things. Maybe curl ? > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > _________________________________________________________________ Microsoft brings you a new way to search the web. Try Bing™ now http://www.bing.com?form=MFEHPG&publ=WLHMTAG&crea=TEXT_MFEHPG_Core_tagline_try bing_1x1