I think you need HTTP headers.  At a minimum, you need this:
Content-type: text/html

Note the blank line after Content-type.

Here's out $html should look:
$html="Content-type: text/html

<HTML>
<HEAD>
<TITLE>Bremsenserver</TITLE>
</HEAD>
<BODY>test</BODY>
</HTML>";

Note that spreading this string on multiple lines was intentional. It's more readable than embedding \n.

At 1/21/2004 07:00 PM, Lars Oeschey wrote:

Hi,

seems I got some problems getting HTTP:Daemon to do what I want ;) In
this case I don't want to serve any physical pages, but just deliver
everything right from within perl. Basically I want to display a page
with a button, and when the button is pressed, a sub shall run. But as
of now, I even don't get any output from the server... This is the code
so far:

---------------------
$html="<HTML>\n<HEAD>\n<TITLE>Bremsenserver</TITLE>\n</HEAD><BODY>test</
BODY></HTML>";

my $http = HTTP::Daemon->new ( LocalPort => 82);
print $http->url;
while (my $connect = $http->accept) {
                        $request=$connect->get_request;
                        print "GET";
                        $connect->send_status_line;
                        $connect->send_response($html);
        }
        $connect->close;
        undef $connect;
------------------------

Lars

--
visit The C.O.R.E. http://www.the-core.net

_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs




--- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.560 / Virus Database: 352 - Release Date: 1/8/2004
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.560 / Virus Database: 352 - Release Date: 1/8/2004

Reply via email to