Re: Header problem
| From: | Ashley Sheridan | Date: | Sun, 04 Oct 2009 16:30:29 +0000 |
| Subject: | Re: Header problem | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-298561@lists.php.net to get a copy of this message | ||
On Sun, 2009-10-04 at 18:10 +0200, Kim Madsen wrote:
> Hi kranthi
>
> kranthi wrote on 2009-10-03 16:21:
> > Thats a lot of headers to read..
> > At a first glance I can see that you did not specify a content-length
> > header. this is a must and must be equal to the size of the file in
> > bytes
>
> I've noticed that too, but it's impossiple to determine the length of
> the zipfile, when creating the file in memory.
>
> Instead I'm now writing the file to disk and uses filesize on the
> zipfile to get the length for Content-Length, then I use
> readfile("zipfile.zip") instead of echo $zip->file(); But the result is
> still the same :-/
>
> Kind regards
> Kim
>
Afaik, the content length header is not necessary, but it will cause
problems if it's set and it's wrong.
Thanks,
Ash
http://www.ashleysheridan.co.uk