Incorrect read length, http and php
Aaron Bentley
aaron.bentley at utoronto.ca
Fri Sep 22 14:25:51 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John Arbash Meinel wrote:
> Also, I think it is more useful to keep a small checksum (like
> crc/adler) of the compressed .knit contents, rather than the sha hash of
> the full text. Because to check the full text, you have to extract the
> data, and expand it from parents, etc.
You have a point about checking the contents for transmission
corruption. That does work best for compressed texts.
> Versus just checking that the
> compressed data matches the right crc. If you want to check the sha
> hash, you have to extract it anyway, which means you might as well get
> the sha from the .knit.
No. When copying raw deltas, we can corrupt a repository if it
disagrees with the source repository about what the parent's contents
should be. And that's what the parent sha1 is useful for. Downloading
the parent hunk itself isn't useful, because we want to compare the
expanded parent texts on either side, and we can use the sha1 as a proxy.
> Also, in the php case, the .kndx file is going to be served as php as
> well, so it isn't like we will be reading the index, and then reading
> bogus data for the .knit file.
Yes, I'm surprised the .kndx wasn't the problem.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFFE+Rf0F+nu1YWqI0RAuS2AJ9zXe53izymbo9KPtHadkfxi2PS+ACfcGSc
FB0EaURWL6W4SW2pXWy5SJc=
=A6Xn
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list