Firefox Websocket implementation send a "Connection: keep-alive, upgrade"
header during the handshake (and as descripted on the last hybi draft
the "Connection" header must include, but doesn't need to be equal to,
"upgrade":
'4. A "Connection" header field that includes the token "Upgrade",
treated as an ASCII case-insensitive value.'
From:
http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-17#page-23
R=golang-dev, ukai, cw, rsc
CC=golang-dev
https://golang.org/cl/5233059
Adjust goyacc.go to produce code that is gofmt-compliant whenever it is easy to do so. Also changed two lines in cpyact that appeared to be bugs.
Also updated units.y to remove a few other errors.
After this change, units.go has only two style errors: an extra newline at the top of the file, and yys misaligned in yySymType.
R=rsc
CC=golang-dev
https://golang.org/cl/5265047
Notably, the "data" argument should be nil if no options are
given, or (at least) the cgroup filesystem will refuse to
mount.
R=bradfitz, rsc
CC=golang-dev
https://golang.org/cl/5147047
Previously, the tokenizer made two passes per token. The first pass
established the token boundary. The second pass picked out the tag name
and attributes inside that boundary. This was problematic when the two
passes disagreed. For example, "<p id=can't><p id=won't>" caused an
infinite loop because the first pass skipped everything inside the
single quotes, and recognized only one token, but the second pass never
got past the first '>'.
This change rewrites the tokenizer to use one pass, accumulating the
boundary points of token text, tag names, attribute keys and attribute
values as it looks for the token endpoint.
It should still be reasonably efficient: text, names, keys and values
are not lower-cased or unescaped (and converted from []byte to string)
until asked for.
One of the token_test test cases was fixed to be consistent with
html5lib. Three more test cases were temporarily disabled, and will be
re-enabled in a follow-up CL. All the parse_test test cases pass.
R=andybalholm, gri
CC=golang-dev
https://golang.org/cl/5244061
Also test only specific fixes, not all fixes.
This means we don't have to keep updating old
test cases to match later changes to the library.
I had to adjust some of the reflect test cases,
because they were implicitly testing
reflect+oserrorstring, not just reflect.
R=golang-dev, bradfitz, r
CC=golang-dev
https://golang.org/cl/5283042
On recent Debian systems the gold 2.20 check triggers though
Debian doesn't have version 2.20 but rather has:
GNU gold (GNU Binutils for Debian 2.21.52.20110606) 1.11
^^^^
R=rsc, iant
CC=golang-dev
https://golang.org/cl/5252055
The decompression routine is in its own file because
G3 encoding (which is more complicated) will be put
there.
R=nigeltao
CC=golang-dev
https://golang.org/cl/5177047
(more are possible but omitted for now as they are part of
specific tests where rather than changing what is there we
should probably expand the tests to cover the new case)
R=rsc, dvyukov
CC=golang-dev
https://golang.org/cl/5247058
Its purpose is not only undocumented, it's also unknown (to me
and Russ, at least) and leads to complexity, bugs and
confusion.
R=golang-dev, adg, rsc
CC=golang-dev
https://golang.org/cl/5213043
The work buffer management used by the garbage
collector during parallel collections leaks buffers.
This CL tests for and fixes the leak.
R=golang-dev, dvyukov, r
CC=golang-dev
https://golang.org/cl/5254059
Use FlagNoPointers and do not zeroize memory when allocate strings.
test/garbage/parser.out old new
run #1 32.923s 32.065s
run #2 33.047s 31.931s
run #3 32.702s 31.841s
run #4 32.718s 31.838s
run #5 32.702s 31.868s
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5259041
This mode was needed before for clients of
the go/scanner that were parsing non-Go code.
All those clients have been moved to scanner
or have been deleted from the library.
R=r
CC=golang-dev
https://golang.org/cl/5232051
The current implementation of formatting for incomplete programs
cannot tolerate program rewrites; ignore -rewrite in that case
with a warning message (temporary solution).
Fix a couple of crashes that were introduced recently.
Fixes#2348.
R=rsc
CC=golang-dev
https://golang.org/cl/5233054