At 6:51 PM -0800 11/29/01, David Iberri wrote:
>on 11/29/2001 5:21 PM, John Murray at [EMAIL PROTECTED] wrote:
>>  If I send a form to a script that the sends back some html, the browser
>>  displays that.
>>
>>  Now, obviously it's an IP address thing. You know, you pass your IP address
>>  along with the form data when you click submit.
>>
>>  What is it then that stops people pushing a html file at a known IP that is
>>  currently online.
>>
>>  My endpoint is this. I want to be able to send a form to a remote script and
>>  then have that script call a script on my server that writes a file AND
>>  sends html back to the browser whose form started the whole process.
>John,
>
>Assuming you have control over the remote script, try a redirect a-la
>CGI.pm.
>
>Inside the remote script:
>
>use CGI;
>
>$cgi = new CGI;
>
>.... # process form data
>
># Redirection header
>print $cgi->redirect("http://<yourserver>/path/to/your/script.pl");
>
>Make sure that the last line is the only output to STDOUT, otherwise the
>redirection won't occur.
>
>Any output from script.pl on <yourserver> will be displayed in the user's
>browser.

This is a good suggestion for your 'endpoint' paragraph.

Just to be clear, though, there's no 'pushing' happening.

David's statement "... output from script.pl on <yourserver> will be 
displayed in the user's browser" is true because of the requirements 
of the http protocol, not because of something special about 
redirects or the Perl module CGI.pm.

Under http, what's received by a browser is the server's response to 
that browser's request. Using http's Common Gateway Interface (CGI) 
the server has its own files and executables plus the rest of the 
Internet available for concocting its response.

Even if the web server delegates generation of the response to 
another machine, the original server is controlling the process; its 
goal is to fulfill the requirement to send a response to the 
browser's request. If it can't -- because a requested HTML file 
doesn't exist, or a requested CGI script produces no output, or 
whatever -- then it (the original web server) must send an error 
message back to the browser. Redirection happens in this context.

Lose the phrase 'IP push', along with the idea of "pushing a[n] html 
file at a known IP that is currently online."

If it's web, it's request-response.

1;
-- 

   - Bruce

__bruce_van_allen__santa_cruz_ca__

Reply via email to