Re: Content-Length in cache files.
Juliusz Chroboczek <[email protected]>
| Newsgroups | gmane.comp.web.polipo.user |
|---|---|
| Message-ID | <[email protected]> |
> If you are think of chunk encoded object, yes the cache file of such object
> do not know the content-length at the beginning. However, once the object is
> fully downloaded.
At that point, Polipo will set object->length to the now-known content
length, and call objectMetadataChanged, which calls dirtyDiskEntry, which
will cause a Content-Length entry to be written out.
> If a fresh restart of polipo encountered a cache file without
> Content-Length, and the Cache Control indicate the cache is public and not
> yet expired. There is no way the polipo can be sure if the cache file is
> full or partial.
Polipo should consider the file as partial in that case.
> 4. Use vi to change the Content-Length header into some other header but
> keep the size of that header line. trim some data off the end of the cache
> file. This emulates a partial written cache.
> 5 access the file again. You will get the partial file.
Looks like a bug. Could you provide a trace of the HTTP exchange?
Juliusz
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july