Hi Nick, Thank you for your answer. I guess module for CGI would be a guideline for what I need to do. I just want to double check whether I am on the right track or not. So when a HTTP request with a query string is received, in my mind, the only way to handle it is the CGI which would in turn run an executable file with given parameters in the query string that has been parsed by the server. I am wondering if all HTTP methods, such as GET/DELETE/PUT/POST, etc. are handled in CGI or this is only GET? Also, would I be able to use CGI module and tailor it for my usage to handle a received request as I wish e.g. establishing a connection to a database or do something else based on the query string?
Thanks for your help, Danesh Daroui On Wed, Sep 19, 2018 at 4:51 PM Nick Kew <n...@apache.org> wrote: > > > > On 19 Sep 2018, at 13:57, Danesh Daroui <danesh.dar...@gmail.com> wrote: > > > > Hi all, > > > > I am sorry if my question is a bit off! I am wondering whether it is > > possible to write a server module that can handle different HTTP > > methods in a customized way? > > Of course it's possible, and indeed common: see for example mod_dav, > or even the oldest application module of all, mod_cgi. > > However, your question leads me to wonder if what you're looking for > might not be better accomplished in configuration. If you need > functionality that isn't already supported, that would call for a new > module (or equivalent), but you'd use configuration to determine > when it should or shouldn't be invoked to process a request. > > -- > Nick Kew