Apache and custom HTTP method

apache-2.2http-method

Is it possible to make apache accept custom HTTP methods? Say I want to send DESCRIBE method.

I tried enabling it in Limit directive but apache returned 405 method not allowed.

Here is my config, it's in mod_userdir.

    <Directory /home/*/public_html>
        AllowOverride All
        Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
        <Limit GET POST PUT DELETE OPTIONS DESCRIBE>
              Order allow,deny
              Allow from all
        </Limit>
        <LimitExcept GET POST PUT DELETE OPTIONS DESCRIBE>
              Order deny,allow
              Deny from all
        </LimitExcept>
   </Directory>

I enabled PUT and DELETE methods in that config also, as default configuration does not allow PUT and DELETE.

Best Answer

Yes, this is possible. You'd have to write a module to accept the custom method. Mod_dav might be a good place to start; I don't know of any others that extend Apache's methods.

Related Topic