]> Cypherpunks repositories - gostls13.git/commit
net/http: remove more garbage from chunk reading
authorBrad Fitzpatrick <bradfitz@golang.org>
Tue, 20 Nov 2012 03:50:42 +0000 (19:50 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 20 Nov 2012 03:50:42 +0000 (19:50 -0800)
commit9466c27fec1d5e37c37f73a4cd2e32ad16460384
treea7ed11daccaf0f28683e4db0555c7171cb4210b5
parentd32d1e098a1022e45f4a7afd05c328b72c5df8ee
net/http: remove more garbage from chunk reading

Noticed this while closing tabs. Yesterday I thought I could
ignore this garbage and hope that a fix for issue 2205 handled
it, but I just realized that's the opposite case,
string->[]byte, whereas this is []byte->string.  I'm having a
hard time convincing myself that an Issue 2205-style fix with
static analysis and faking a string header would be safe in
all cases without violating the memory model (callee assumes
frozen memory; are there non-racy ways it could keep being
modified?)

R=dsymonds
CC=dave, gobot, golang-dev
https://golang.org/cl/6850067
src/pkg/net/http/chunked.go
src/pkg/net/http/chunked_test.go
src/pkg/net/http/httputil/chunked.go
src/pkg/net/http/httputil/chunked_test.go