Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Is it possible to make apache accept custom http methods? Say I want to send DESCRIBE (example) method. I tried enabling it in Limit directive but apache returned 405 method not allowed.

Heres my config, its 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.

share|improve this question
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. –  Michael Kjörling Nov 22 '11 at 12:26
1  
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 '11 at 13:11
2  
Also HTTP specification does not forbid implementation of custom methods. –  Peter Nov 22 '11 at 13:16
    
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 ;) –  Paulpro Jul 4 '13 at 23:09

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
    
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 '11 at 15:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.