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

RE: Malformed header from script


> r is Apache2::RequestRec=SCALAR(0x98d2108)
> I was given '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
> Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
>  <html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en-gb"
> lang="en-gb">
>  <head>
> '
> 
> So, the perl code is using an Apache2::RequestRec object to print out
> the header, and I am using a simple 'print STDERR' statement to print
> out the same thing to the error log.  My 'print STDERR' statement works
> fine and the header gets printed to the apache error log.  However, my
> web page DOES NOT have an HTML header:

It is not an HTML header that is lacking, but an HTTP header - your web
browser has no idea what type of page you are sending it.

At the very least, you need:
--------------------------------
Content-Type: text/html

--------------------------------
(not the dashed lines, but the bits in between _ a content-type header
plus a new line to separate the headers from the content itself.

You'll find debugging a whole lot easier if you use Firefox with an
add-on like Firebug - it gives you much more information about what is
going on behind the scenes. 


Clint


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.