I see that they are easy to use and understand, but I could not find any reference to them in the documentation. The fact that Bash can be used as a CGI language is in the documentation, but nothing on the helper functions -- not even that they exist.
Claude On Thu, Feb 18, 2021 at 6:05 PM Dino Ciuffetti <d...@tuxweb.it> wrote: > Is there documentation for any of these methods? If you can point me to > the proper section of the code base I can probably figure it out and > document if necessary. > Claude > > > The code is super simple, does not require any dependency and is auto > explicative. > You are not calling any method. > There are 4 functions that are implemented at the beginning of the script: > sendcontentheader() > and sendstatuscode() send only a single header to stdout, endheaders() send > newline character to end the response headers and begin the body section, > sendbody() write some html to stdout. > > The function that sends the HTTP Status code header is sendstatuscode(). > > Also, try to directly exec the script from command line to get the > output, that is: > > dino@a1:/tmp# chmod 755 test.cgi > dino@a1:/tmp# ./test.cgi > Content-Type: text/html > Status: 410 Gone > > <html> > <head><title>HI!</title></head><body><h2>Hi there, this is <b>test.cgi</b> > speaking.<h2><h3>HTTP Status code: 410 Gone</h3</body> > </html> > > > > -- I like: Like Like - The likeliest place on the web <http://like-like.xenei.com> LinkedIn: http://www.linkedin.com/in/claudewarren