in reply to CGI::header() & What's !DOCTYPE..?
Here's a fairly bare-bones version of my script that I have confirmed still exhibits the same behavior:
params() was a good idea, but then I tried Vars() and it works beautifully with any decent header, once I noticed that you have to import the *:cgi-lib* functions from CGI.#This script recieves valid data POSTed to it from an HTML form. use CGI qw/:standard/; use CGI::Pretty; ### HERE IS THE PROBLEM: ############################################# +######### ##Un-comment one or the other of these next two lines to reproduce the + problem# # + # #print "Content-type: text/html\n\n"; #Using this line works beautifu +lly. # # + # #print header(); #Using this line stalls the browser. + # # + # ###################################################################### +######### print "<HTML><HEAD><TITLE>Confirmation</TITLE></HEAD><BODY BGCOLOR=\"3 +355ff\">"; print h1('Header'); print h4('Trying sysread..'); $data = try_sysread(); print $data; print h4('Sysread done..'); print end_html; exit; ########## sub try_sysread(){ sysread(STDIN,$d,$ENV{CONTENT_LENGTH}); return $d; };
I still don't know why this sysread thing happened, though.. any ideas would still be appreciated, if only for the joy of abstract knowledge (especially for the joy of abstract knowledge.. practical knowledge hurts when you don't have it.)
==========
Can an atheist be insured against acts of God?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: The code, a solution, and many many thanks
by chromatic (Archbishop) on Mar 16, 2001 at 09:20 UTC |