]> Cypherpunks repositories - gostls13.git/log
gostls13.git
13 years agohttp: DoS protection: cap non-Handler Request.Body reads
Brad Fitzpatrick [Sat, 15 Oct 2011 00:34:07 +0000 (17:34 -0700)]
http: DoS protection: cap non-Handler Request.Body reads

Previously, if an http.Handler didn't fully consume a
Request.Body before returning and the request and the response
from the handler indicated no reason to close the connection,
the server would read an unbounded amount of the request's
unread body to advance past the request message to find the
next request's header. That was a potential DoS.

With this CL there's a threshold under which we read
(currently 256KB) in order to keep the connection in
keep-alive mode, but once we hit that, we instead
switch into a "Connection: close" response and don't
read the request body.

Fixes #2093 (along with number of earlier CLs)

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5268043

13 years agohttp: avoid panic caused by nil URL
Anthony Martin [Sat, 15 Oct 2011 00:09:38 +0000 (17:09 -0700)]
http: avoid panic caused by nil URL

The current code will panic if an invalid
request (one with a nil URL) is passed to
the doFollowingRedirects function.

Also, remove a redundant nil Header check.

R=bradfitz
CC=golang-dev
https://golang.org/cl/5270046

13 years agogodoc: updates for latest Go app-engine release.
Robert Griesemer [Fri, 14 Oct 2011 23:06:39 +0000 (16:06 -0700)]
godoc: updates for latest Go app-engine release.

R=adg
CC=golang-dev
https://golang.org/cl/5273044

13 years agodoc: add go-tour-kr, a Korean translation of A Tour of Go
Andrew Gerrand [Fri, 14 Oct 2011 21:42:31 +0000 (08:42 +1100)]
doc: add go-tour-kr, a Korean translation of A Tour of Go

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5273043

13 years agogodefs: add enum/const testdata
Dave Cheney [Fri, 14 Oct 2011 21:34:00 +0000 (17:34 -0400)]
godefs: add enum/const testdata

Also, add golden output data for linux/arm.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5256041

13 years agoxml: match Marshal's XMLName behavior in Unmarshal
Chris Farmiloe [Fri, 14 Oct 2011 21:29:54 +0000 (17:29 -0400)]
xml: match Marshal's XMLName behavior in Unmarshal

When xml.Marshal is called on a struct it will happily
reflect the information in the "tag" of an XMLName member
regardless of the type to give the struct a tag-name in
it's XML form. This is backed up by the documentation which
says:

However xml.Unmarshal *does* care about the XMLName field
being of type xml.Name, and currently returns the error
"field XMLName does not have type xml.Name" if you have it
set to something else.

This is firstly inconsistant with xml.Marshal but it also
makes it impossible to use xml.Marshal alongside other
Marshallers (like json/bson) without poluting the state's
namespace with XMLName fields. Inorder to exclude fields
from other Marshallers the convention has been started to
tag fields as "omitempty"; which will cause the field not
to display if it is at it's "zero" state, XMLName cannot
have such as zero-state since it is a struct, so it is nicer
to use a pointer/bool value for XMLName so it can be easily
excluded when I want to Marshal my struct by some other
wire format.

Attached is the proposed minor change, that simply stops
erring if it can't set the name on the XMLName field, which
is just optional metadata anyway.
Fixes #2265.

R=rsc
CC=golang-dev
https://golang.org/cl/5067044

13 years agohttp: RoundTrippers shouldn't mutate Request
Brad Fitzpatrick [Fri, 14 Oct 2011 21:16:43 +0000 (14:16 -0700)]
http: RoundTrippers shouldn't mutate Request

Fixes #2146

R=rsc
CC=golang-dev
https://golang.org/cl/5284041

13 years agogofmt: fix //line handling
Russ Cox [Fri, 14 Oct 2011 19:54:45 +0000 (15:54 -0400)]
gofmt: fix //line handling

Fixes #2369.

R=gri
CC=golang-dev
https://golang.org/cl/5275048

13 years agobuild: stop on failed deps.bash
Russ Cox [Fri, 14 Oct 2011 19:54:36 +0000 (15:54 -0400)]
build: stop on failed deps.bash

Apparently some versions of bash do the ||exit implicitly
when in set -e mode, but others do not.  ???

R=gri
CC=golang-dev
https://golang.org/cl/5285043

13 years agold: Fixes issue 1899 ("cannot create 8.out.exe")
Jaroslavas Počepko [Fri, 14 Oct 2011 19:37:07 +0000 (20:37 +0100)]
ld: Fixes issue 1899 ("cannot create 8.out.exe")

http://code.google.com/p/go/issues/detail?id=1899

R=rsc, alex.brainman, bsiegert, hectorchu, bradfitz
CC=golang-dev
https://golang.org/cl/4978047

13 years agocrypto/x509: add code for dealing with PKIX public keys.
Adam Langley [Fri, 14 Oct 2011 19:11:21 +0000 (15:11 -0400)]
crypto/x509: add code for dealing with PKIX public keys.

We also have functions for dealing with PKCS#1 private keys. This
change adds functions for PKIX /public/ keys. Most of the time one
won't be parsing them because they usually come in certificates, but
marshaling them happens and I've previously copied the code from
x509.go for this.

R=bradfitz, rsc
CC=golang-dev
https://golang.org/cl/5286042

13 years agocrypto/x509: keep the raw Subject and Issuer.
Adam Langley [Fri, 14 Oct 2011 19:06:54 +0000 (15:06 -0400)]
crypto/x509: keep the raw Subject and Issuer.

X509 names, like everything else X509, are ludicrously general. This
change keeps the raw version of the subject and issuer around for
matching. Since certificates use a distinguished encoding, comparing
the encoding is the same as comparing the values directly. This came
up recently when parsing the NSS built-in certificates which use the
raw subject and issuer for matching trust records to certificates.

R=bradfitz
CC=golang-dev
https://golang.org/cl/5275047

13 years agoasn1: accept UTF8 strings as ASN.1 ANY values
Adam Langley [Fri, 14 Oct 2011 19:06:11 +0000 (15:06 -0400)]
asn1: accept UTF8 strings as ASN.1 ANY values

R=bradfitz
CC=golang-dev
https://golang.org/cl/5172042

13 years agohttp: shut up a false Transport warning on Windows
Brad Fitzpatrick [Fri, 14 Oct 2011 18:31:00 +0000 (11:31 -0700)]
http: shut up a false Transport warning on Windows

Fixes #2057

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5269044

13 years agowebsocket: tweak hybi ReadHandshake to supports Firefox implementation
Luca Greco [Fri, 14 Oct 2011 18:27:45 +0000 (14:27 -0400)]
websocket: tweak hybi ReadHandshake to supports Firefox implementation

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

13 years agoA+C: Luca Greco (individual CLA)
Russ Cox [Fri, 14 Oct 2011 18:27:26 +0000 (14:27 -0400)]
A+C: Luca Greco (individual CLA)

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5274045

13 years agogoyacc: make more gofmt-compliant
Chris Hundt [Fri, 14 Oct 2011 17:10:02 +0000 (13:10 -0400)]
goyacc: make more gofmt-compliant

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

13 years agoCONTRIBUTORS: Chris Hundt (Google CLA)
Russ Cox [Fri, 14 Oct 2011 17:09:56 +0000 (13:09 -0400)]
CONTRIBUTORS: Chris Hundt (Google CLA)

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5284043

13 years agonet: skip ICMP test on Windows too unless uid 0
Brad Fitzpatrick [Fri, 14 Oct 2011 17:07:27 +0000 (10:07 -0700)]
net: skip ICMP test on Windows too unless uid 0

This test fails for me on Windows 7 64-bit non-Admin.

R=golang-dev, rsc, krautz
CC=golang-dev
https://golang.org/cl/5276048

13 years agocrypto/tls: fix broken looping code in windows root CA fetcher
Mikkel Krautz [Fri, 14 Oct 2011 16:26:38 +0000 (12:26 -0400)]
crypto/tls: fix broken looping code in windows root CA fetcher

R=alex.brainman, hectorchu, rsc
CC=golang-dev
https://golang.org/cl/5263045

13 years agosyscall: adjust Mount to accomodate stricter FS implementations.
David Anderson [Fri, 14 Oct 2011 16:19:45 +0000 (09:19 -0700)]
syscall: adjust Mount to accomodate stricter FS implementations.

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

13 years agocrypto/tls: disable root cert fetching to fix windows build
Alex Brainman [Fri, 14 Oct 2011 06:53:01 +0000 (17:53 +1100)]
crypto/tls: disable root cert fetching to fix windows build

R=golang-dev
CC=golang-dev
https://golang.org/cl/5267044

13 years agohtml: fix some tokenizer bugs with attribute key/values.
Nigel Tao [Fri, 14 Oct 2011 04:22:02 +0000 (15:22 +1100)]
html: fix some tokenizer bugs with attribute key/values.

The relevant spec sections are 13.2.4.38-13.2.4.40.
http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#attribute-value-(double-quoted)-state

R=andybalholm
CC=golang-dev
https://golang.org/cl/5262044

13 years agocrypto/tls: fetch root CA from Windows store
Mikkel Krautz [Fri, 14 Oct 2011 02:58:19 +0000 (22:58 -0400)]
crypto/tls: fetch root CA from Windows store

R=rsc
CC=golang-dev
https://golang.org/cl/5281044

13 years agogotype: move to exp/gotype per Go 1 plan
Robert Griesemer [Thu, 13 Oct 2011 23:36:53 +0000 (16:36 -0700)]
gotype: move to exp/gotype per Go 1 plan

R=r, dsymonds
CC=golang-dev
https://golang.org/cl/5269043

13 years agogotype: fix build (update test)
Robert Griesemer [Thu, 13 Oct 2011 23:06:27 +0000 (16:06 -0700)]
gotype: fix build (update test)

R=r
CC=golang-dev
https://golang.org/cl/5277044

13 years agohtml: rewrite the tokenizer to be more consistent.
Nigel Tao [Thu, 13 Oct 2011 22:58:39 +0000 (09:58 +1100)]
html: rewrite the tokenizer to be more consistent.

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

13 years agogofix: make fix order explicit
Russ Cox [Thu, 13 Oct 2011 22:45:38 +0000 (18:45 -0400)]
gofix: make fix order explicit

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

13 years agogo/types: move to exp/types per Go 1 plan
Robert Griesemer [Thu, 13 Oct 2011 22:41:48 +0000 (15:41 -0700)]
go/types: move to exp/types per Go 1 plan

This package is only used by gotype at the moment.

R=rsc, r
CC=golang-dev
https://golang.org/cl/5266042

13 years agogc: disallow close on receive-only channels
Russ Cox [Thu, 13 Oct 2011 20:58:04 +0000 (16:58 -0400)]
gc: disallow close on receive-only channels

Fixes #2353.
Fixes #2246.

R=golang-dev, r, gri
CC=golang-dev
https://golang.org/cl/5282042

13 years agocrypto/tls: more Unix root certificate locations
Russ Cox [Thu, 13 Oct 2011 20:17:15 +0000 (16:17 -0400)]
crypto/tls: more Unix root certificate locations

Hard work done by
http://mercurial.selenic.com/wiki/CACertificates

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5276043

13 years agoruntime: run goroutines during init
Russ Cox [Thu, 13 Oct 2011 19:54:23 +0000 (15:54 -0400)]
runtime: run goroutines during init

Fixes #583.
Fixes #1776.
Fixes #2001.
Fixes #2112.

R=golang-dev, bradfitz, r, gri
CC=golang-dev
https://golang.org/cl/5265044

13 years agogc: stricter multiple assignment + test
Russ Cox [Thu, 13 Oct 2011 19:46:39 +0000 (15:46 -0400)]
gc: stricter multiple assignment + test

Fixes #693.

R=ken2
CC=golang-dev
https://golang.org/cl/5265045

13 years agospec: define order of multiple assignment
Russ Cox [Thu, 13 Oct 2011 19:44:17 +0000 (15:44 -0400)]
spec: define order of multiple assignment

R=golang-dev, r, gri
CC=golang-dev
https://golang.org/cl/5240055

13 years agocrypto/tls: fetch root certificates using Mac OS API
Mikkel Krautz [Thu, 13 Oct 2011 17:59:13 +0000 (13:59 -0400)]
crypto/tls: fetch root certificates using Mac OS API

Fixes #1009.

R=adg, rsc
CC=golang-dev
https://golang.org/cl/5262041

13 years agomake.bash: more robustly detect gold 2.20
Christopher Wedgwood [Thu, 13 Oct 2011 16:25:25 +0000 (12:25 -0400)]
make.bash: more robustly detect gold 2.20

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

13 years agogc: implement new return restriction
Russ Cox [Thu, 13 Oct 2011 16:17:55 +0000 (12:17 -0400)]
gc: implement new return restriction

R=ken2
CC=golang-dev
https://golang.org/cl/5245056

13 years agobuild: fix for new return restriction
Russ Cox [Thu, 13 Oct 2011 16:17:18 +0000 (12:17 -0400)]
build: fix for new return restriction

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5257057

13 years agogo/types: clean up after test
Russ Cox [Thu, 13 Oct 2011 16:17:08 +0000 (12:17 -0400)]
go/types: clean up after test

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5245057

13 years agoemacs: add a "godoc" command, like M-x man
Evan Martin [Thu, 13 Oct 2011 16:07:42 +0000 (09:07 -0700)]
emacs: add a "godoc" command, like M-x man

This runs godoc and displays its output in a new buffer.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5268041

13 years agodoc: minor homepage tweak
Brad Fitzpatrick [Thu, 13 Oct 2011 16:03:24 +0000 (09:03 -0700)]
doc: minor homepage tweak

Don't imply that the tour isn't browser-based.

R=adg
CC=golang-dev
https://golang.org/cl/5265041

13 years agogc: pass FlagNoPointers to runtime.new
Dmitriy Vyukov [Thu, 13 Oct 2011 08:06:55 +0000 (11:06 +0300)]
gc: pass FlagNoPointers to runtime.new

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5151043

13 years agodoc: remove link to http://golanguage.ru/
Dmitriy Vyukov [Thu, 13 Oct 2011 07:09:43 +0000 (10:09 +0300)]
doc: remove link to http://golanguage.ru/
I check it for several months and it always says
ERR_NAME_RESOLUTION_FAILED

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5272041

13 years agopkg: fix incorrect prints found by govet
Robert Hencke [Thu, 13 Oct 2011 02:34:01 +0000 (13:34 +1100)]
pkg: fix incorrect prints found by govet

R=golang-dev, nigeltao
CC=golang-dev
https://golang.org/cl/5266041

13 years agoimage/tiff: Implement PackBits decoding.
Benny Siegert [Thu, 13 Oct 2011 02:31:26 +0000 (13:31 +1100)]
image/tiff: Implement PackBits decoding.

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

13 years agohtml: insert implied <p> and </p> tags
Andrew Balholm [Thu, 13 Oct 2011 01:40:48 +0000 (12:40 +1100)]
html: insert implied <p> and </p> tags

(test # 25 in tests1.dat)
#data
<p><b><div></p></b></div>X
#document
| <html>
|   <head>
|   <body>
|     <p>
|       <b>
|     <div>
|       <b>
|
|           <p>
|           "X"

R=nigeltao
CC=golang-dev
https://golang.org/cl/5254060

13 years agohtml: when a parse test fails, don't bother testing rendering.
Nigel Tao [Thu, 13 Oct 2011 00:53:15 +0000 (11:53 +1100)]
html: when a parse test fails, don't bother testing rendering.

R=andybalholm
CC=golang-dev
https://golang.org/cl/5248061

13 years agogotest: correct the documentation of -parallel.
Rob Pike [Wed, 12 Oct 2011 23:56:39 +0000 (16:56 -0700)]
gotest: correct the documentation of -parallel.
It said the default was zero, but it's actually $GOMAXPROCS.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5229059

13 years agofmt: remove an obsolete reference to os.ErrorString in a comment
Rob Pike [Wed, 12 Oct 2011 20:50:08 +0000 (13:50 -0700)]
fmt: remove an obsolete reference to os.ErrorString in a comment

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5229057

13 years agoupdates: append(y,[]byte(z)...) -> append(y,z...)"
Christopher Wedgwood [Wed, 12 Oct 2011 20:42:04 +0000 (13:42 -0700)]
updates: append(y,[]byte(z)...) -> append(y,z...)"

(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

13 years agogo/typechecker: delete per Go 1 plan
Robert Griesemer [Wed, 12 Oct 2011 20:07:55 +0000 (13:07 -0700)]
go/typechecker: delete per Go 1 plan

(go/types will be future replacement)

R=r
CC=golang-dev
https://golang.org/cl/5232052

13 years agohttp: remove Request.RawURL
Brad Fitzpatrick [Wed, 12 Oct 2011 18:48:25 +0000 (11:48 -0700)]
http: remove Request.RawURL

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

13 years agonetchan: move to old/netchan
Rob Pike [Wed, 12 Oct 2011 18:46:50 +0000 (11:46 -0700)]
netchan: move to old/netchan
Part of Go version 1 rearrangement.
No gofix, since the new name is not in Go 1.

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5245055

13 years agocatch future accidental dependencies to exp/ or old/
Brad Fitzpatrick [Wed, 12 Oct 2011 17:55:42 +0000 (10:55 -0700)]
catch future accidental dependencies to exp/ or old/

R=golang-dev, adg, rsc
CC=golang-dev
https://golang.org/cl/5247055

13 years agogodoc: setup script for app engine, cleanups
Robert Griesemer [Wed, 12 Oct 2011 17:48:38 +0000 (10:48 -0700)]
godoc: setup script for app engine, cleanups

- automated app-engine setup with bash script
- added README.godoc-app
- removed orphaned files in misc/godoc

R=rsc
CC=golang-dev
https://golang.org/cl/5231042

13 years agonet: Return error from CloseRead and CloseWrite.
Albert Strasheim [Wed, 12 Oct 2011 17:45:25 +0000 (13:45 -0400)]
net: Return error from CloseRead and CloseWrite.

R=bradfitz, rsc, iant
CC=golang-dev
https://golang.org/cl/5167043

13 years agonet: fix "unexpected socket family" error from WriteToUDP.
Albert Strasheim [Wed, 12 Oct 2011 17:36:45 +0000 (13:36 -0400)]
net: fix "unexpected socket family" error from WriteToUDP.

R=rsc, iant, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/5128048

13 years agoruntime: fix memory leak in parallel garbage collector
Russ Cox [Wed, 12 Oct 2011 17:23:34 +0000 (13:23 -0400)]
runtime: fix memory leak in parallel garbage collector

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

13 years agoruntime: faster strings
Dmitriy Vyukov [Wed, 12 Oct 2011 14:40:02 +0000 (17:40 +0300)]
runtime: faster strings
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

13 years agoruntime: append([]byte, string...)
Luuk van Dijk [Wed, 12 Oct 2011 13:59:23 +0000 (15:59 +0200)]
runtime: append([]byte, string...)

Fixes #2274

R=rsc, gri, dsymonds, bradfitz, lvd
CC=golang-dev
https://golang.org/cl/5149045

13 years agogo/scanner: remove AllowIllegalChars mode
Robert Griesemer [Wed, 12 Oct 2011 05:28:56 +0000 (22:28 -0700)]
go/scanner: remove AllowIllegalChars mode

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

13 years agogofmt: fix a couple of crashes, disallow rewrites for incomplete programs
Robert Griesemer [Wed, 12 Oct 2011 04:49:53 +0000 (21:49 -0700)]
gofmt: fix a couple of crashes, disallow rewrites for incomplete programs

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

13 years agoexp/datafmt: delete per Go 1 plan
Robert Griesemer [Wed, 12 Oct 2011 00:52:37 +0000 (17:52 -0700)]
exp/datafmt: delete per Go 1 plan

R=r, bradfitz
CC=golang-dev
https://golang.org/cl/5249055

13 years agoebnf, ebnflint: move under exp
Robert Griesemer [Wed, 12 Oct 2011 00:43:10 +0000 (17:43 -0700)]
ebnf, ebnflint: move under exp

pkg/ebnf -> pkg/exp/ebnf
cmd/ebnflint -> pkg/exp/ebnflint

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5188042

13 years agoexp/spdy: move http/spdy to exp/spdy
Brad Fitzpatrick [Tue, 11 Oct 2011 23:45:01 +0000 (16:45 -0700)]
exp/spdy: move http/spdy to exp/spdy

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5238051

13 years agocontainer/vector: delete
Rob Pike [Tue, 11 Oct 2011 23:41:48 +0000 (16:41 -0700)]
container/vector: delete
Slices are better:
http://code.google.com/p/go-wiki/wiki/SliceTricks

R=golang-dev, bradfitz, dsymonds
CC=golang-dev
https://golang.org/cl/5248060

13 years agonet: implement ip protocol name to number resolver for windows
Alex Brainman [Tue, 11 Oct 2011 23:29:22 +0000 (10:29 +1100)]
net: implement ip protocol name to number resolver for windows

Fixes #2215.
Fixes #2216.

R=golang-dev, dave, rsc
CC=golang-dev
https://golang.org/cl/5248055

13 years agotry: delete
Rob Pike [Tue, 11 Oct 2011 23:17:21 +0000 (16:17 -0700)]
try: delete
A fun experiment but not carrying its weight.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5246054

13 years agosyscall: add #ifdefs to fix the manual corrections in ztypes_linux_arm.go
Dave Cheney [Tue, 11 Oct 2011 19:47:00 +0000 (15:47 -0400)]
syscall: add #ifdefs to fix the manual corrections in ztypes_linux_arm.go

Fixes #1998.

ztypes_linux_arm.go has been regenerated on an arm5 debian sid host and
includes a few new constants.

R=golang-dev, mikioh.mikioh, rsc
CC=golang-dev
https://golang.org/cl/5240047

13 years agogodoc: show source code if -src flag is set in command-line mode
Robert Griesemer [Tue, 11 Oct 2011 18:47:24 +0000 (11:47 -0700)]
godoc: show source code if -src flag is set in command-line mode

This also shows the source code of exported functions in server
mode (e.g. pkg/big/?m=src).

Fixes #2360.

R=rsc
CC=golang-dev
https://golang.org/cl/5254057

13 years agocrypto/tls: add 3DES ciphersuites
Louis Kruger [Tue, 11 Oct 2011 17:07:32 +0000 (13:07 -0400)]
crypto/tls: add 3DES ciphersuites

The following ciphersuites are added:
TLS_RSA_WITH_3DES_EDE_CBC_SHA
TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
This change helps conform to the TLS1.1 standard because
the first ciphersuite is "mandatory" in RFC4346

R=golang-dev, agl, rsc
CC=golang-dev
https://golang.org/cl/5164042

13 years agoCONTRIBUTORS: add Louis Kruger (Google CLA)
Russ Cox [Tue, 11 Oct 2011 17:07:01 +0000 (13:07 -0400)]
CONTRIBUTORS: add Louis Kruger (Google CLA)

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5229052

13 years agoruntime: fix crash when returning from syscall during gc
Hector Chu [Tue, 11 Oct 2011 16:57:16 +0000 (12:57 -0400)]
runtime: fix crash when returning from syscall during gc

gp->m can go from non-nil to nil when it re-enters schedule().

R=golang-dev
CC=golang-dev, rsc
https://golang.org/cl/5245042

13 years agonet: fix socket leak in case of Dial failure
Chris Farmiloe [Tue, 11 Oct 2011 16:53:16 +0000 (12:53 -0400)]
net: fix socket leak in case of Dial failure

Socket descriptors are not closed when fd.connect() fails during generic socket creation.
After a connection failure [ECONNREFUSED] descriptors are left in SYN_SENT state indefinitely (unless they get an explicit RST). Repeated failed connections will eventually cause your program to hit the user/system max-open-files limit.

Fixes #2349.

R=golang-dev, mikioh.mikioh
CC=golang-dev
https://golang.org/cl/5229047

13 years agofmt: fix doc typo
Brad Fitzpatrick [Tue, 11 Oct 2011 15:49:09 +0000 (08:49 -0700)]
fmt: fix doc typo

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5252050

13 years agogodoc: support multiple examples
Andrew Gerrand [Tue, 11 Oct 2011 00:11:47 +0000 (11:11 +1100)]
godoc: support multiple examples
gotest: document examples
go/doc: tidy comment

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5235055

13 years agogob: avoid one copy for every message written.
Rob Pike [Mon, 10 Oct 2011 19:38:49 +0000 (12:38 -0700)]
gob: avoid one copy for every message written.
Plus the need for a second in-memory buffer.
Plays a bit fast and loose with the contents of a byte buffer,
but saves a potentially huge allocation. The gotest
run is about 10% faster overall after this change.

R=golang-dev, r, gri
CC=golang-dev
https://golang.org/cl/5236043

13 years agoA+C: Chris Farmiloe (individual CLA)
Mikio Hara [Mon, 10 Oct 2011 11:48:24 +0000 (20:48 +0900)]
A+C: Chris Farmiloe (individual CLA)

R=adg
CC=golang-dev
https://golang.org/cl/5237058

13 years agohtml: add a Render function.
Nigel Tao [Mon, 10 Oct 2011 03:44:37 +0000 (14:44 +1100)]
html: add a Render function.

R=mikesamuel, andybalholm
CC=golang-dev
https://golang.org/cl/5218041

13 years agohttp: cancel test timers; don't t.Fatalf in other goroutines
Brad Fitzpatrick [Mon, 10 Oct 2011 00:57:31 +0000 (17:57 -0700)]
http: cancel test timers; don't t.Fatalf in other goroutines

R=rsc
CC=golang-dev
https://golang.org/cl/5228041

13 years agodoc: fix tutorial and Makefile PATH without dot
Andrew Gerrand [Mon, 10 Oct 2011 00:16:04 +0000 (11:16 +1100)]
doc: fix tutorial and Makefile PATH without dot

Fixes #2351.

R=r, bradfitz
CC=golang-dev
https://golang.org/cl/5235056

13 years agodashboard: include last 100 lines in build failure mail
Andrew Gerrand [Sat, 8 Oct 2011 19:50:21 +0000 (06:50 +1100)]
dashboard: include last 100 lines in build failure mail

R=golang-dev, rsc, iant, robert.hencke
CC=golang-dev
https://golang.org/cl/5235041

13 years agogc: changes to export format in preparation for inlining.
Luuk van Dijk [Sat, 8 Oct 2011 17:37:06 +0000 (19:37 +0200)]
gc: changes to export format in preparation for inlining.

string literals used as package qualifiers are now prefixed with '@'
which obviates the need for the extra ':' before tags.

R=rsc, gri, lvd
CC=golang-dev
https://golang.org/cl/5129057

13 years agocrypto/tls: forgot this file in the last change.
Adam Langley [Sat, 8 Oct 2011 14:11:38 +0000 (10:11 -0400)]
crypto/tls: forgot this file in the last change.

R=bradfitz
CC=golang-dev
https://golang.org/cl/5244042

13 years agocrypto/tls: add server side SNI support.
Adam Langley [Sat, 8 Oct 2011 14:06:53 +0000 (10:06 -0400)]
crypto/tls: add server side SNI support.

With this in place, a TLS server is capable of selecting the correct
certificate based on the client's ServerNameIndication extension.

The need to call Config.BuildNameToCertificate is unfortunate, but
adding a sync.Once to the Config structure made it uncopyable and I
felt that was too high a price to pay. Parsing the leaf certificates
in each handshake was too inefficient to consider.

R=bradfitz, rsc
CC=golang-dev
https://golang.org/cl/5151048

13 years agoruntime: improve locking on openbsd
Joel Sing [Sat, 8 Oct 2011 13:56:13 +0000 (00:56 +1100)]
runtime: improve locking on openbsd

Implement a locking model based on the current linux model - a
tri-state mutex with active spinning, passive spinning and sleeping.

R=golang-dev, dvyukov, rsc
CC=golang-dev
https://golang.org/cl/4974043

13 years agogofmt: update test.sh
Robert Griesemer [Fri, 7 Oct 2011 22:14:37 +0000 (15:14 -0700)]
gofmt: update test.sh

R=r
CC=golang-dev
https://golang.org/cl/5235043

13 years agotesting: fix time reported for failing tests.
Rob Pike [Fri, 7 Oct 2011 21:15:16 +0000 (14:15 -0700)]
testing: fix time reported for failing tests.
t.ns was hanging after recent changes.

R=gri, rsc
CC=golang-dev
https://golang.org/cl/5237044

13 years agogodoc: show "unexported" declarations when executing "godoc builtin"
Robert Griesemer [Fri, 7 Oct 2011 19:45:19 +0000 (12:45 -0700)]
godoc: show "unexported" declarations when executing "godoc builtin"

Was never working correctly when executing from the command-line.

R=r
CC=golang-dev
https://golang.org/cl/5236042

13 years agogo/token: remove obsolete comment (cleanup)
Robert Griesemer [Fri, 7 Oct 2011 15:54:02 +0000 (08:54 -0700)]
go/token: remove obsolete comment (cleanup)

R=r
CC=golang-dev
https://golang.org/cl/5235042

13 years agonet: add File method to IPConn
Mikio Hara [Fri, 7 Oct 2011 13:53:12 +0000 (22:53 +0900)]
net: add File method to IPConn

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5237041

13 years agoutf8: add Valid and ValidString
Brad Fitzpatrick [Fri, 7 Oct 2011 05:47:24 +0000 (22:47 -0700)]
utf8: add Valid and ValidString

R=r, rsc, alex.brainman
CC=golang-dev
https://golang.org/cl/5234041

13 years agogodoc: use scanner instead of go/scanner for ebnf processing of spec
Robert Griesemer [Fri, 7 Oct 2011 04:46:05 +0000 (21:46 -0700)]
godoc: use scanner instead of go/scanner for ebnf processing of spec

Also: Fewer calls to flush for faster processing (once per identifier
or error instead of once per token).

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5236041

13 years agoimage: delete obsolete color.go
Nigel Tao [Fri, 7 Oct 2011 02:33:34 +0000 (13:33 +1100)]
image: delete obsolete color.go

I accidentally left it off of https://golang.org/cl/5132048/.

R=r
CC=golang-dev
https://golang.org/cl/5202042

13 years agogo/token: document deserialization property
Robert Griesemer [Fri, 7 Oct 2011 00:37:59 +0000 (17:37 -0700)]
go/token: document deserialization property

FileSet deserialization (Read) uses its own instance of a gob decoder.
If the FileSet data may be followed by other data on the reader, Read
may consume too much data that is lost unless the reader implements
ReadByte.

Also: Minor internal refactoring for symmetry.

R=r
CC=golang-dev
https://golang.org/cl/5233041

13 years agogodoc: use a bufio.Buffer to read search index
Robert Griesemer [Fri, 7 Oct 2011 00:36:00 +0000 (17:36 -0700)]
godoc: use a bufio.Buffer to read search index

Also: Minor refactoring for cleanliness and symmetry.

Fixes #2286.

R=r
CC=golang-dev
https://golang.org/cl/5232041

13 years agogo/ast: don't remove function bodies when filtering exports
Robert Griesemer [Thu, 6 Oct 2011 23:07:56 +0000 (16:07 -0700)]
go/ast: don't remove function bodies when filtering exports

This is a semantic but no API change. It is a cleaner
implementation of pure filtering. Applications that
need function bodies stripped can easily do this them-
selves.

R=rsc
CC=golang-dev
https://golang.org/cl/5206046

13 years agogodoc: documentation for all (not just exported) declarations
Robert Griesemer [Thu, 6 Oct 2011 23:06:23 +0000 (16:06 -0700)]
godoc: documentation for all (not just exported) declarations

Removed the URL form parameter "f=text" in favor of a more
flexible mode parameter "m" which now accepts a list of mode
flags as documented in doc.go.

Fixes #1784.

R=rsc
CC=golang-dev
https://golang.org/cl/5227041

13 years agotag weekly.2011-10-06
Andrew Gerrand [Thu, 6 Oct 2011 23:01:57 +0000 (16:01 -0700)]
tag weekly.2011-10-06

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5231041

13 years agoweekly.2011-10-06 weekly.2011-10-06
Andrew Gerrand [Thu, 6 Oct 2011 22:56:02 +0000 (15:56 -0700)]
weekly.2011-10-06

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5207044