Hi,

RFC3875 section 6.2.1 says:

    "The [CGI] script MUST return a Content-Type header field...."

So your $header oughta be something like

my $header = << 'EOF';
Content-Type: text/html

<DOCTYPE html>
...
EOF


Best regards
Robert


On Sun, 20 Nov 2016 13:54:39 +0000
Bob Jones <r.a.n.d.o.m.d.e.v.4+openbsdm...@gmail.com> wrote:

> Does slowcgi somehow interfere with normal Perl parsing ?  (OpenBSD 6)
> 
> I have a simple Perl Script as follows :
> 
> ===================
> #!/usr/bin/perl
> use 5.014;
> use strict;
> use warnings;
> use autodie;
> my $header = << 'END_HEADER';
> <!DOCTYPE html>
> <html lang="en">
> <head>
> <meta charset="utf-8">
> <title>Test</title>
> </head>
> <body>
> END_HEADER
> print $header;
> ======================
> 
> 
> Running this on the CLI yields the result as expected :
> 
> ================
> <!DOCTYPE html>
> <html lang="en">
> <head>
> <meta charset="utf-8">
> <title>Test</title>
> </head>
> <body>
> =================
> 
> However running this via slowcgi, the first line gets stripped out :
> 
> ==================
> <html lang="en">
> <head>
> <meta charset="utf-8">
> <title>Wifi</title>
> </head>
> <body>
> Incorrect parameters</body>
> </html>
> ====================
> 
> What's going on ???

Reply via email to