]> Cypherpunks repositories - gostls13.git/commit
archive/zip: write data descriptor signature for OS X; fix bugs reading it
authorBrad Fitzpatrick <bradfitz@golang.org>
Fri, 9 Mar 2012 22:12:02 +0000 (14:12 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 9 Mar 2012 22:12:02 +0000 (14:12 -0800)
commit3cea4131dfa3d07f74b53a4f26412d4a0470717e
tree5822154bdf123c2bad1d53a2af02c9a829718672
parentece0d0e7d2b70539b16b2a0c9ad0fa9afd68a92d
archive/zip: write data descriptor signature for OS X; fix bugs reading it

We now always write the "optional" streaming data descriptor
signature, which turns out to be required for OS X.

Also, handle reading the data descriptor with or without the
signature, per the spec's recommendation. Fix data descriptor
reading bugs found in the process.

Fixes #3252

R=golang-dev, alex.brainman, nigeltao, rsc
CC=golang-dev
https://golang.org/cl/5787062
src/pkg/archive/zip/reader.go
src/pkg/archive/zip/reader_test.go
src/pkg/archive/zip/struct.go
src/pkg/archive/zip/testdata/go-no-datadesc-sig.zip [new file with mode: 0644]
src/pkg/archive/zip/testdata/go-with-datadesc-sig.zip [new file with mode: 0644]
src/pkg/archive/zip/writer.go
src/pkg/archive/zip/writer_test.go