Re: Content-Length in cache files.
Ming Fu <[email protected]>
| Newsgroups | gmane.comp.web.polipo.user |
|---|---|
| Message-ID | <[email protected]> |
How about this fix, just make any cache without Content-Length as invalid
cache?
[fming@fed polipo-1.0.4]$ diff -c diskcache.c*
*** diskcache.c 2008-01-08 07:56:45.000000000 -0500
--- diskcache.c.new 2009-08-13 09:39:21.824972608 -0400
***************
*** 959,964 ****
--- 959,969 ----
goto invalid;
}
+ if (length < 0) {
+ do_log(L_ERROR, "Cache file without Content-Length %s.\n", location);
+ goto invalid;
+ }
+
if(!(object->flags & OBJECT_INITIAL)) {
if((last_modified >= 0) != (object->last_modified >= 0))
goto invalid;
[fming@fed polipo-1.0.4]$
Ming
------------------------------------------------------------------------------
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