[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Problem with checksums...

From: <jerenkrantz_at_apache.org>
Date: 2003-01-21 01:53:35 CET

--On Monday, January 20, 2003 16:37:08 -0600 Karl Fogel
kfogel@newton.ch.collab.net wrote:

 Yup. Something is busted. We need to find out what it is.
...
 Are you checking out over ra_dav?

Yup, I am. I think I sorta figured it out.

Okay, I get mondo stupid points for this problem. (I went away and came
back and figured it out. *sigh*)

Here's the problem:

1. Have a gzip'd file in your repository (call it foo.gz)
2. Have the following AddEncoding line in httpd.conf which is:
    AddEncoding x-gzip gz tgz
   (This is there by default)
3. Use the 'ModMimeUsePathInfo On' option for your SVN repos location in
httpd.conf (not a default). This tells mod_mime to be involved in SVN
requests and look at the path info component of the URL - this is needed to
trigger the above AddEncoding line. It is *very* useful for when you don't
want to set the mime-type property and let httpd figure out the type
transparently using the standard mod_mime rules. (Also need this for
filters.)
4. Checkout with a checksum-enabled SVN.
5. Wince.

What happens is that neon is transparently decompressing the response since
it has Content-Encoding: x-gzip in the header. Note that you don't need
mod_deflate triggered (I don't think it would compress twice because it
tries to prevent this). Therefore, Subversion gets a truly corrupt file -
it's uncompressed when it's not really supposed to be.

ne_compress.c line 247 has:

if (ctx-enchdr strcasecmp(ctx-enchdr, gzip) == 0) {

x-gzip matches. Perhaps it'd be nice if we could get neon to only
recognize 'gzip' rather than 'x-gzip.' I don't know if that's legal or not.

So, checksums are working just fine. Yay!

But, I'm not really sure what we can do to fix this though. It'd be really
nice to distinguish between mod_deflate'd content and non-mod_deflate'd
content. This is the generic 'I download the .gz file and it looks like
text' problem. *sigh* I don't know if this should be fixed in httpd or
neon though. Both things are sorta working right independently, but
together, they blow up real good. The temporary fix is to pick one:

1) remove the AddEncoding line,
2) remove ModMimeUsePathInfo line,
3) set compression=no in .subversion/config

The nice thing would have been if SVN told me what the filename was. If I
had seen '.gz,' this would have gone a lot quicker. =) -- justin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 14 02:03:25 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.