summaryrefslogtreecommitdiff
path: root/AUTHORS
diff options
context:
space:
mode:
authorCristian Staretu <unclejacksons@gmail.com>2014-07-17 10:00:29 +1000
committerCristian Staretu <unclejacksons@gmail.com>2014-07-17 10:00:29 +1000
commit14baf7022b47d5efe94ef30d38fa3b30b5fb680e (patch)
treef3459f454927e323725345d46962eff23e6c2daf /AUTHORS
parentba5bd4f39f67e0d3b8df76db9926737840f44e9e (diff)
downloadgo-14baf7022b47d5efe94ef30d38fa3b30b5fb680e.tar.gz
archive/tar: fix writing of pax headers
"archive/tar: reuse temporary buffer in writeHeader" introduced a change which was supposed to help lower the number of allocations from 512 bytes for every call to writeHeader. This change broke the writing of PAX headers. writeHeader calls writePAXHeader and writePAXHeader calls writeHeader again. writeHeader will end up writing the PAX header twice. example broken header: PaxHeaders.4007/NetLock_Arany_=Class_Gold=_Ftanstvny.crt0000000000000000000000000000007112301216634021512 xustar0000000000000000 PaxHeaders.4007/NetLock_Arany_=Class_Gold=_Ftanstvny.crt0000000000000000000000000000007112301216634021512 xustar0000000000000000 example correct header: PaxHeaders.4290/NetLock_Arany_=Class_Gold=_Ftanstvny.crt0000000000000000000000000000007112301216634021516 xustar0000000000000000 0100644000000000000000000000270412301216634007250 0ustar0000000000000000 This commit adds a dedicated buffer for pax headers to the Writer struct. This change increases the size of the struct by 512 bytes, but allows tar/writer to avoid allocating 512 bytes for all written headers and it avoids allocating 512 more bytes for pax headers. LGTM=dsymonds R=dsymonds, dave, iant CC=golang-codereviews https://codereview.appspot.com/110480043 Committer: David Symonds <dsymonds@golang.org>
Diffstat (limited to 'AUTHORS')
0 files changed, 0 insertions, 0 deletions