You need to set optRawInput, see the FAQs about escaping and unescaping,
e.g.

[- $optRawInput = 1 -]



Gerald

-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     [EMAIL PROTECTED]         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 19, 2001 6:13 AM
Subject: Hanging on IO::Socket call


> Hi,
>
> I am running into a problem where an embperl page with the code below
> hangs during the while loop reading data from a remote socket. This
> function works fine as a standard perl script called cgi under mod_perl.
> Has anyone seen this behavior or know of a workaround or fix?
>
> Using:
> Embperl     v1.3.1
> mod_perl    v1.25
> IO::Socket  v1.7
> Apache      v1.3.17
>
> Thanks in advance,
> Kent
>
> use IO::Socket;
>
> sub MakeRequest {
>     my ($msg) = @_;
>     my $socket;
>     my $data;
>     $socket = IO::Socket::INET->new( PeerAddr => "x.x.x.x",
>                  PeerPort => "yyyy",
>                  Proto    => "tcp",
>                  Type     => SOCK_STREAM )
>         or die "Couldn't connect : $@\n";
>     $msg = $XML_HEAD . $msg;
>     print $socket $msg;
>     $msg = "";
>     while ( ! ( ($data = <$socket>) =~ "</EOF>" ) ) {
>         $msg .= $data;
>     }
>     $msg .= $data;
>     close( $socket );
>     return $msg;
> }
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to