perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas den Braber" <tho...@delos.nl>
Subject Re: Zip on the fly problem
Date Wed, 13 Jan 2010 07:55:37 GMT
Yes I am sure that second argument is false.
In the old version I only used one argument but changed the second to 0
hoping that solved the problem.

As Torsten was suggesting, I tested with:

  script | cat > file

And yes that also fails with Archive::Zip 1.30  and worked ok
with 1.26

  script > file  

Worked in both versions.

There is something wrong in the new Archive::Zip module
I send a message to the CPAN forum hope they pick it up.

Thank,

Thomas den Braber

-----Original Message-----
From: Ronald J Kimball <rjk-perl-modperl@tamias.net>
To: Scott Gifford <sgifford@suspectclass.com>
Cc: Thomas den Braber <thomas@delos.nl>, modperl@perl.apache.org
Date: Tue, 12 Jan 2010 23:06:49 -0500
Subject: Re: Zip on the fly problem

> On Tue, Jan 12, 2010 at 10:11:04PM -0500, Scott Gifford wrote:
> > On Tue, Jan 12, 2010 at 7:49 AM, Thomas den Braber <thomas@delos.nl>
> wrote:
> > [ ... ]
> > 
> > > The error is: 'IO error: seeking to rewrite local header : Invalid
> > > argument'
> > >
> > 
> > That error means that after writing something to the ZIP archive, it
> tried
> > to go backwards to put what it just wrote in the header, but found it
> > couldn't do that because it's output is going over the network and
> what's
> > already sent can't be changed.
> > 
> > A temporary file is certainly one fix, as people here have suggested.
>  The
> > fact that it used to work means that it must be possible to generate
> a ZIP
> > file without seeking around, so my advice would be to poke around in
> the
> > options and see if you find anything useful.
> 
> The second argument to writeToFileHandle is supposed to address that:
> 
> writeToFileHandle( $fileHandle [, $seekable] )
> 
>     Write a zip archive to a file handle. Return AZ_OK on success. The
>     optional second arg tells whether or not to try to seek backwards
> to
>     re-write headers.
> 
>     ...
> 
>     If you pass a file handle that is not seekable (like if you're
> writing
>     to a pipe or a socket), pass a false second argument:
> 
>     ...
> 
> Thomas, are you sure the actual code in question is passing a false
> value
> as the second argument?
> 
> Ronald



Mime
View raw message