Bug: Polipo always revalidates resources with Content-Length >= CHUNK_SIZE

"Will Manley" <[email protected]>
Newsgroups gmane.comp.web.polipo.user
Message-ID <[email protected]>
The tests that I added to my branch[1] fail because Polipo seems to try
to revalidate all it's resources when the size of the resource
(Content-Length) >= CHUNK_SIZE.  Specifically the test case
"kim_jong_il" has size 15816 and the test case fails with the default
CHUNK_SIZE=4096.  If that same file is truncated to 4096 bytes and the
Content-Length adjusted accordingly it still fails.  If the same file is
then truncated to 4095 bytes it succeeds and with the original file
building polipo with CHUNK_SIZE=16384 it succeeds.

In summary

file size  |  CHUNK_SIZE  |  result
-----------+--------------+--------------
 15816     |  4096        |  revalidates
 4096      |  4096        |  revalidates
 4095      |  4096        |  success
 15816     |  16384       |  success

If the cache is flushed to disk between the first and second requests
polipo will behave correctly and not try to revalidate the resource.

We have tested with Polipo 1.0.4.1 and jech's git master and both
exhibit the same problem.

We are continuing to investigate.  Unfortunately CHUNK_SIZE appears 195
times in the Polipo source so it could be quite tricky.  Is this
something anyone's seen before?  Any tips about where is best to look to
fix it.

Thanks

Will

[1] git://github.com/wmanley/polipo.git


------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.