Re: PerlRun and text/xml data: zero bytes

2002-09-20 Thread Jon

On Thu, 19 Sep 2002 09:45:53 -0500
Scott Nelson [EMAIL PROTECTED] wrote:

 I am having problems reading standard input while running under PerlRun. 
 I am trying to use text/xml data POSTed to an url, as opposed to form-data.
 
 I get the data when running in CGI mode, but I get zero bytes when 
 running in PerlRun mode. How do I read the data POSTed to the URL?
 
 I have isolated my problem down to this short script:
 
 #! /usr/bin/perl -w
 
 use strict;
 use diagnostics;
 use XML::LibXML;
 
 my $parser = XML::LibXML-new();
 my @input = ;
 my $input = join(\n, @input);
 #my $doc = $parser-parse_string($input);
 #my $plainText = $doc-toString();
 my $plainText = $input;
 my $length = length($plainText);
 
 print Content-type: text/plain\n;
 print Content-length: $length\n;
 print \n;
 print $plainText;
 
 The content length is 0!


I guess you've checked that $plainText isn't of length 0?

/Jon



PerlRun and text/xml data: zero bytes

2002-09-19 Thread Scott Nelson

I am having problems reading standard input while running under PerlRun. 
I am trying to use text/xml data POSTed to an url, as opposed to form-data.

I get the data when running in CGI mode, but I get zero bytes when 
running in PerlRun mode. How do I read the data POSTed to the URL?

I have isolated my problem down to this short script:

#! /usr/bin/perl -w

use strict;
use diagnostics;
use XML::LibXML;

my $parser = XML::LibXML-new();
my input = ;
my $input = join(\n, input);
#my $doc = $parser-parse_string($input);
#my $plainText = $doc-toString();
my $plainText = $input;
my $length = length($plainText);

print Content-type: text/plain\n;
print Content-length: $length\n;
print \n;
print $plainText;

The content length is 0!




Re: PerlRun and text/xml data: zero bytes

2002-09-19 Thread Scott Nelson

Jon wrote:

I guess you've checked that $plainText isn't of length 0?

/Jon

Well, I read standard input into $input, copy it into $plainText and 
check the length and it is 0. That is my problem: when I run using 
PerlRun it is 0 but I works without a problem when running in CGI mode...