R
Robyn Mylius
i'm trying to read an xml document sent to a cgi script, but the script just
seems to be hanging, not using CPU or memory, just no responce.
i'm just working with simple test scripts at the moment, i want to use the
xml::Simple module but even that hanging so i'm trying to read it from stdin
and just write the xml back out.
what am i doing wrong?
bellow is the script:
XML File:
<config logdir="/var/log/foo/" debugfile="/tmp/foo.debug">
<server name="sahara" osname="solaris" osversion="2.6">
<address>10.0.0.101</address>
<address>10.0.1.101</address>
</server>
<server name="gobi" osname="irix" osversion="6.5">
<address>10.0.0.102</address>
</server>
<server name="kalahari" osname="linux" osversion="2.0.34">
<address>10.0.0.103</address>
<address>10.0.1.103</address>
</server>
</config>
perl script:
use XML::Simple;
#my $config = XMLin("-");
print "Content-type: text/xml\n\n";
#use Data:
umper;
#print Dumper($config);
print $ENV{"Request_Method"} . "\n";
print $ENV{"CONTENT_LENGTH"};
my $query;
read( STDIN, $query, $ENV{"CONTENT_LENGTH"} )
print $query;
seems to be hanging, not using CPU or memory, just no responce.
i'm just working with simple test scripts at the moment, i want to use the
xml::Simple module but even that hanging so i'm trying to read it from stdin
and just write the xml back out.
what am i doing wrong?
bellow is the script:
XML File:
<config logdir="/var/log/foo/" debugfile="/tmp/foo.debug">
<server name="sahara" osname="solaris" osversion="2.6">
<address>10.0.0.101</address>
<address>10.0.1.101</address>
</server>
<server name="gobi" osname="irix" osversion="6.5">
<address>10.0.0.102</address>
</server>
<server name="kalahari" osname="linux" osversion="2.0.34">
<address>10.0.0.103</address>
<address>10.0.1.103</address>
</server>
</config>
perl script:
use XML::Simple;
#my $config = XMLin("-");
print "Content-type: text/xml\n\n";
#use Data:
#print Dumper($config);
print $ENV{"Request_Method"} . "\n";
print $ENV{"CONTENT_LENGTH"};
my $query;
read( STDIN, $query, $ENV{"CONTENT_LENGTH"} )
print $query;