]> Cypherpunks repositories - gostls13.git/commit
http/spdy: fix data race in header decompression.
authorWilliam Chan <willchan@chromium.org>
Tue, 31 May 2011 21:05:35 +0000 (14:05 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 31 May 2011 21:05:35 +0000 (14:05 -0700)
commitfecab4058655c14887b4109b508c7fc640b3b563
tree7e7d87e949ed33a6349b23efff6482e89caec1d3
parentf4349f7368ae46cf7aa34119a6c930ae7be113a2
http/spdy: fix data race in header decompression.

flate's reader greedily reads from the shared io.Reader in Framer. This leads to a data race on Framer.r. Fix this by providing a corkedReader to zlib.NewReaderDict(). We uncork the reader and allow it to read the number of bytes in the compressed payload.

Fixes #1884.

R=bradfitz, rsc, go.peter.90
CC=golang-dev
https://golang.org/cl/4530089
src/pkg/http/spdy/framer.go
src/pkg/http/spdy/framer_test.go