Am Mittwoch, 25. Mai 2005 03.50 schrieb Franklin:
>  Sometimes it ok. But when you run it many times, say 1,000 times,
>  there is serveral times that it return 200, but the stored file is 0
>  bytes, titally empty.

Sorry, but I don't know (and likely won't know) the reason why some of the 
written files are sometimes empty.

The reason could be located at different places, and probably not in the 
getstore of LWP::Simple. 

Maybe a network or file system problem? Or one of the web server? 
Or even an OS problem? (You mention that under windows everything is ok)
Do you run the script in a loop, or in parallel? Do you getstore always the 
same file?

A server 200 ok is mostly followed by content (but it does not say that 
content has been delivered with success, and the webserver could be 
implemented in a way that it returns empty content...)

You could use some network sniffer to look in detail at the data transferred:
to check if no data is sent, or data is sent and locally not stored.
Or you could try to reproduce the symptom using another program which gets web 
pages (for example wget).

Hm... and I don't run a freebsd...


(The problem follows:)

> > On 5/25/05, John Doe <[EMAIL PROTECTED]> wrote:
> > > Am Dienstag, 24. Mai 2005 08.59 schrieb Franklin:
> > > > Hi;
> > > >
> > > > I have a small program that uses getstore to fetch a xml webpahe and
> > > > store it. It is:
> > > >
> > > > use strict;
> > > > use warnings;
> > > >
> > > > use LWP::Simple;
> > > >
> > > > my
> > > > $xmlurl="http://www.sec.gov/Archives/edgar/data/903404/00011814310502
> > > >9692/r rd79736.xml"; my $xmlfile="xml.xml";
> > > > my $status=getstore($xmlurl,$xmlfile);
> > > >
> > > > if(is_success($status))
> > > > {
> > > > print "xmlfile store is ok\n";
> > > > }
> > > > else
> > > > {
> > > > print "xmlfile store isn't ok\n";
> > > > }
> > > >
> > > >
> > > > It works well on windows platform, but doesn't on freebsd. That is,
> > > > every time the getstore function's response is "200 ok", but the
> > > > stored xml file isn't correct, it means, it isn't as same as the xml
> > > > webpage.
> > >
> > > What are the differences then? Is it another file? Or the right one
> > > truncated? Wrong chars? Or...
> > >
> > > > What is wrong with it? And is there any solution or
> > > > alternatives to this problems?
> > >
> > > Maybe?
> > >
> > > joe
> > >
> > > > Thank you very much!
> > > >
> > > > Best wishes
> > > > Franklin
> > > >
> > > > T
> > >
> > > --
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > <http://learn.perl.org/> <http://learn.perl.org/first-response>

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to