Re: result codes from Bash CGI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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>




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux