Mailing List Archive

Support open source code!


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

RE: tlug: META tags in perl scripts



>>>>> "Beth" == Beth Noble <beth@example.com> writes:

    Beth> print "Content-type: text/html\n\n";
    Beth> print "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0;
    Beth>        URL=http://www.x.y.z./file.html\">";

    Beth> I could have just used
    Beth> print "Location: http://www.x.y.z/file.html\n\n";
    Beth> print "Content-type: text/html\n\n";

This will NOT work AFAIK because of the "\n\n", which separates the
headers from the body.  The content-type will be ignored.

Have you tried

print "Location: http://www.x.y.z/file.html\n"; # note single "\n"
print "Refresh: 0; URL=http://www.x.y.z./file.html";

?  (Oh, and doesn't PERL output a newline for every print?  Maybe
those should be printf's?)

Thing is, the browser should barf on the <META ...> in the MIME header
portion.  <META ..> is meaningless outside of the HTML header (ie, it
must come between <HEAD> ... </HEAD>).  Although I wouldn't be
surprised if a nonconformant browser, ie, IE (pronounced Ay-yi-yi!)
did something with it anyway.


-- 
University of Tsukuba                Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences       Tel/fax: +81 (298) 53-5091
_________________  _________________  _________________  _________________
What are those straight lines for?  "XEmacs rules."
-----------------------------------------------------------------------
Next Meeting (w/ YLUG): June 16 (Fri) 19:00 Mizonoguchi Marui Family 12F
Next Technical Meeting: July 8 (Sat)  13:30 Topic: TBA
-----------------------------------------------------------------------
more info: http://www.tlug.gr.jp        Sponsor: Global Online Japan


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links