Re: [users@httpd] Can I serve CLI Applications using Apache

2022-06-23 Thread Ahmad Ismail
Thank you very much. My problem is solved. *Thanks and Best Regards,Ahmad Ismail* On Thu, Jun 23, 2022 at 7:52 PM Eric Covener wrote: > > My question is, can I give apache ADD_HTTP_RESPONSE_MESSAGE instead of > writing it on my own. > > IIUC this is a component that adds headers based on the

Re: [users@httpd] Can I serve CLI Applications using Apache

2022-06-23 Thread Eric Covener
> My question is, can I give apache ADD_HTTP_RESPONSE_MESSAGE instead of > writing it on my own. IIUC this is a component that adds headers based on the output of ADD_UI. I don't see any way to avoid writing it yourself one place or another, and I don't see the upside of embedding it inside of

Re: [users@httpd] Can I serve CLI Applications using Apache

2022-06-23 Thread Ahmad Ismail
Thank you all. After working on my architecture, I have one more requirement. Request | Web_Server | CLI_APP --output json | ADD_UI --output web | ADD_HTTP_RESPONSE_MESSAGE | Web_Server > Response It is the ADD_HTTP_RESPONSE_MESSAGE . I am using it to add HEADERS, response code etc. This is

Re: [users@httpd] Can I serve CLI Applications using Apache

2022-06-23 Thread Yehuda Katz
You still have a bunch of options. Some possibilities using your own code: - Your CGI script or binary called by HTTPD is a wrapper which handles the piping and output capture of the other program. - Your CGI script or binary uses the available environment variables to determine where it is

Re: [users@httpd] Can I serve CLI Applications using Apache

2022-06-23 Thread Eric Covener
On Thu, Jun 23, 2022 at 1:15 AM Ahmad Ismail wrote: > > I have already bumped into CGI (after asking the question here). > > However, I have some issues with CGI. For example, I have to add HEADERS > maintaining CRLF etc in the output. However, I want the CLI app to be totally > independent. I

Re: [users@httpd] Can I serve CLI Applications using Apache

2022-06-23 Thread Ruben Safir
On Thu, Jun 23, 2022 at 11:15:13AM +0600, Ahmad Ismail wrote: > I have already bumped into CGI (after asking the question here). > > However, I have some issues with CGI. For example, I have to add HEADERS > maintaining CRLF etc in the output. However, I want the CLI app to be > totally

Re: [users@httpd] Can I serve CLI Applications using Apache

2022-06-22 Thread Ahmad Ismail
I have already bumped into CGI (after asking the question here). However, I have some issues with CGI. For example, I have to add HEADERS maintaining CRLF etc in the output. However, I want the CLI app to be totally independent. I mean, I want to output regular text or json without any header.

Re: [users@httpd] Can I serve CLI Applications using Apache

2022-06-22 Thread Eric Covener
you can use CGI to prototype it, and FastCGI later for performance (if it matters) On Wed, Jun 22, 2022 at 10:28 AM Ahmad Ismail wrote: > > I want to create a CLI app (in this case named CLI_APP), that will > output json and can be accessed via web. > > In Linux terms, it will look like: > >

[users@httpd] Can I serve CLI Applications using Apache

2022-06-22 Thread Ahmad Ismail
I want to create a CLI app (in this case named CLI_APP), that will output json and can be accessed via web. In Linux terms, it will look like: Request | Web_Server | CLI_APP | ADD_UI | Web_Server > Response Now, I will run the app like `CLI_APP --output json`. Here, I am saying that the CLI_APP