Re: Transferring variables between seperate hosts

From: Joe Smith (Joe.Smith_at_inwap.com)
Date: 07/23/04


Date: Fri, 23 Jul 2004 17:16:07 GMT

Mark wrote:

> you didn't misunderstand as that's pretty much how I understand the
> process of HTTP - the POST variables are just stored in the HTTP
> headers in a platform-independant way so it shouldn't really matter.

The POST variables are stored in the body of the POST, not the headers.

> I just don't seem to be able to display them in my page using Perl.

1) Parse the POST body, using CGI.pm or other module that puts the
    field names and values into a perl hash.
2) Create an HTML response using the data obtained from step 1.

I'd recommend writing a simple perl CGI that can handle this:
   <form action="/cgi-bin/hello-world.cgi" method="POST">
   <input type="text" name="yourname" value="Enter your name here">
   <input type="hidden" name="private_variable" value="secret">
   </form>

        -Joe



Relevant Pages

  • Re: Transferring variables between seperate hosts
    ... No you didn't misunderstand as that's pretty much how I understand the ... process of HTTP - the POST variables are just stored in the HTTP ... > define the action value as URL to the second server, ...
    (comp.lang.php)
  • Re: Transferring variables between seperate hosts
    ... No you didn't misunderstand as that's pretty much how I understand the ... process of HTTP - the POST variables are just stored in the HTTP ... > define the action value as URL to the second server, ...
    (comp.lang.perl)
  • Re: Net::HTTP - POST and GET in the same request
    ... http = Net::HTTP.new ... puts response.body ... The x=y become POST variables and the drop out of the ... Note: including http:// in the domain gives a connection error, ...
    (comp.lang.ruby)