Re: how to get post data when using shell script as cgi script.

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

 



On Wed, Jan 3, 2018 at 9:22 PM, Ruben Safir <mrbrklyn@xxxxxxxxx> wrote:
On 01/03/2018 10:21 PM, Keva-Slient wrote:
> i use set in script printing all environment variables.
>  there is no variable named "QUERY_STRING_POST"
>
> using shell script getting post data is found in  this webpage.

set is a shell script command not an HTTPD command.

Yes, the person asking the question knows that. They are using their shell's set command to display all the variables known to the shell session, including environment variables. They were expecting to find an environment variable that contained the data from the HTTP POST request. They know that it isn't a HTTP(D) command. They are asking how to read the HTTP POST data stream from a shell script as opposed to a more typical language like Python or C++.

My advice to the OP is don't use shell scripts (that is, a program written in sh/bash/ksh/zsh or similar languages that adhere to the POSIX 1003 shell standard). That can only lead to much wasted time, bugs, and security holes. Yes, it is technically possible to handle a HTTP POST request using such a shell. But you shouldn't do it.

--
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank

[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