2

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.

4
  • 1
    Why on earth do you want to do something like that? Even if you can massage Apache into accepting it (I'm not sure you can, since Apache is designed to be a HTTP server), no user agent is going to speak your custom method anyway. If instead you describe your goal, maybe someone can propose an actual solution.
    – user
    Nov 22, 2011 at 12:26
  • 2
    Why I want that? Just fooling around :). Also I know that custom extension to http is "bad", I meant this only for personal project, or rather I say, test.
    – Peter
    Nov 22, 2011 at 13:11
  • 3
    Also HTTP specification does not forbid implementation of custom methods.
    – Peter
    Nov 22, 2011 at 13:16
  • 1
    This made me laugh. Sounds like something I'd find myself doing in my spare time too though. In fact that's how I ended up on this page ;)
    – Paul
    Jul 4, 2013 at 23:09

1 Answer 1

2

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.

1
  • Oh didn't think about that, thanks for tip. It's definetly worth a try, if just for a heck of it.
    – Peter
    Nov 22, 2011 at 15:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .