]> Cypherpunks repositories - gostls13.git/log
gostls13.git
13 years agocrypto/rsa: change public exponent from 3 to 65537
Adam Langley [Wed, 26 Oct 2011 14:41:24 +0000 (10:41 -0400)]
crypto/rsa: change public exponent from 3 to 65537

Although there's still no concrete security reason not to use 3, I
think Bleichenbacher has convinced me that it's a useful defense and
it's what everyone else does.

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

13 years agonet: document why we do not use SO_REUSEADDR on windows
Alex Brainman [Wed, 26 Oct 2011 11:25:20 +0000 (22:25 +1100)]
net: document why we do not use SO_REUSEADDR on windows

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

13 years ago.hgignore: ignore src/pkg/exp/ebnflint/ebnflint
Alex Brainman [Wed, 26 Oct 2011 11:22:33 +0000 (22:22 +1100)]
.hgignore: ignore src/pkg/exp/ebnflint/ebnflint

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

13 years agogc: fix [568]g -V crash
Mikio Hara [Wed, 26 Oct 2011 07:16:46 +0000 (16:16 +0900)]
gc: fix [568]g -V crash

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

13 years agoredo CL 5302057 / dac58d9c9e4a
Andrew Gerrand [Wed, 26 Oct 2011 06:27:29 +0000 (15:27 +0900)]
redo CL 5302057 / dac58d9c9e4a

««« original CL description
http: remove Connection header in ReverseProxy

Fixes #2342

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5302057
»»»

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

13 years agotag weekly.2011-10-26
Andrew Gerrand [Wed, 26 Oct 2011 06:10:00 +0000 (15:10 +0900)]
tag weekly.2011-10-26

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

13 years agoweekly.2011-10-26 (new rune type) weekly.2011-10-26
Andrew Gerrand [Wed, 26 Oct 2011 05:47:38 +0000 (14:47 +0900)]
weekly.2011-10-26 (new rune type)

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

13 years agoexp/norm: use rune
Russ Cox [Wed, 26 Oct 2011 05:26:12 +0000 (22:26 -0700)]
exp/norm: use rune

Nothing terribly interesting here. (!)

Since the public APIs are all in terms of UTF-8,
the changes are all internal only.

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

13 years agocsv, gob, json, mail, mime, xml: use rune
Russ Cox [Wed, 26 Oct 2011 05:23:54 +0000 (22:23 -0700)]
csv, gob, json, mail, mime, xml: use rune

Nothing terribly interesting here.

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

13 years agobufio, io: use rune
Russ Cox [Wed, 26 Oct 2011 05:23:34 +0000 (22:23 -0700)]
bufio, io: use rune

ReadRune, WriteRune change signature.

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

13 years agounicode, utf8, utf16: use rune
Russ Cox [Wed, 26 Oct 2011 05:23:15 +0000 (22:23 -0700)]
unicode, utf8, utf16: use rune

Everything changes.

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

13 years agoold/regexp, old/template, template: use rune
Russ Cox [Wed, 26 Oct 2011 05:22:42 +0000 (22:22 -0700)]
old/regexp, old/template, template: use rune

Nothing terribly interesting here.

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

13 years agoexp/template/html: use rune
Russ Cox [Wed, 26 Oct 2011 05:22:26 +0000 (22:22 -0700)]
exp/template/html: use rune

Nothing terribly interesting here.

R=mikesamuel, nigeltao, r
CC=golang-dev
https://golang.org/cl/5307044

13 years agobytes, strings: use rune
Russ Cox [Wed, 26 Oct 2011 05:22:09 +0000 (22:22 -0700)]
bytes, strings: use rune

Various rune-based APIs change.

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

13 years agobig: update for fmt interface changes
Russ Cox [Wed, 26 Oct 2011 05:21:49 +0000 (22:21 -0700)]
big: update for fmt interface changes

Nothing terribly interesting here.

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

13 years agofmt: use rune
Russ Cox [Wed, 26 Oct 2011 05:21:33 +0000 (22:21 -0700)]
fmt: use rune

Lots of internal edits.

Formatter and Scanner interfaces change
(clients to be checked by govet).

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

13 years agoexp/winfsnotify: fix govet-found bug
Russ Cox [Wed, 26 Oct 2011 05:21:14 +0000 (22:21 -0700)]
exp/winfsnotify: fix govet-found bug

R=golang-dev, hectorchu
CC=golang-dev
https://golang.org/cl/5304044

13 years agoregexp: use rune
Russ Cox [Wed, 26 Oct 2011 05:20:57 +0000 (22:20 -0700)]
regexp: use rune

Public API of syntax tree changes.

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

13 years agogovet: update signatures for rune
Russ Cox [Wed, 26 Oct 2011 05:20:35 +0000 (22:20 -0700)]
govet: update signatures for rune

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

13 years agogodoc, exp/ebnf, exp/types, go/scanner, scanner: use rune
Russ Cox [Wed, 26 Oct 2011 05:20:20 +0000 (22:20 -0700)]
godoc, exp/ebnf, exp/types, go/scanner, scanner: use rune

API question: is a scanner token an int or a rune?

Since the rune is the common case and the token values
are the special (negative) case, I chose rune.  But it could
easily go the other way.

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

13 years agocgo, goyacc, go/build, html, http, path, path/filepath, testing/quick, test: use...
Russ Cox [Wed, 26 Oct 2011 05:20:02 +0000 (22:20 -0700)]
cgo, goyacc, go/build, html, http, path, path/filepath, testing/quick, test: use rune

Nothing terribly interesting here.

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

13 years agogc: introduce rune
Russ Cox [Wed, 26 Oct 2011 05:19:39 +0000 (22:19 -0700)]
gc: introduce rune

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

13 years agoexp/types: add rune to universe
Russ Cox [Wed, 26 Oct 2011 05:19:09 +0000 (22:19 -0700)]
exp/types: add rune to universe

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

13 years agoundo CL 5302057 / dac58d9c9e4a
Andrew Gerrand [Wed, 26 Oct 2011 05:16:34 +0000 (14:16 +0900)]
undo CL 5302057 / dac58d9c9e4a

need a clean base from weekly.2011-10-25 for rune change

««« original CL description
http: remove Connection header in ReverseProxy

Fixes #2342

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5302057
»»»

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

13 years agohttp: remove Connection header in ReverseProxy
Brad Fitzpatrick [Wed, 26 Oct 2011 05:11:01 +0000 (22:11 -0700)]
http: remove Connection header in ReverseProxy

Fixes #2342

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

13 years agotag weekly.2011-10-25
Andrew Gerrand [Wed, 26 Oct 2011 05:10:44 +0000 (14:10 +0900)]
tag weekly.2011-10-25

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

13 years agoweekly.2011-10-25 weekly.2011-10-25
Andrew Gerrand [Wed, 26 Oct 2011 05:09:25 +0000 (14:09 +0900)]
weekly.2011-10-25

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

13 years agohtml: improve parsing of lists
Andrew Balholm [Wed, 26 Oct 2011 03:02:30 +0000 (14:02 +1100)]
html: improve parsing of lists

Make a <li> tag close the previous <li> element.
Make a </ul> tag close <li> elements.

Pass tests1.dat, test 33:
<!DOCTYPE html><li>hello<li>world<ul>how<li>do</ul>you</body><!--do-->

| <!DOCTYPE html>
| <html>
|   <head>
|   <body>
|     <li>
|       "hello"
|     <li>
|       "world"
|       <ul>
|         "how"
|         <li>
|           "do"
|       "you"
|   <!-- do -->

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

13 years agohtml: improve parsing of tables
Andrew Balholm [Wed, 26 Oct 2011 00:36:46 +0000 (11:36 +1100)]
html: improve parsing of tables

When foster parenting, merge adjacent text nodes.
Properly close table row at </tr> tag.

Pass tests1.dat, test 32:
<!-----><font><div>hello<table>excite!<b>me!<th><i>please!</tr><!--X-->

| <!-- - -->
| <html>
|   <head>
|   <body>
|     <font>
|       <div>
|         "helloexcite!"
|         <b>
|           "me!"
|         <table>
|           <tbody>
|             <tr>
|               <th>
|                 <i>
|                   "please!"
|             <!-- X -->

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

13 years agosyscall: correct name of mksyscall script in comment
Ian Lance Taylor [Tue, 25 Oct 2011 19:49:51 +0000 (12:49 -0700)]
syscall: correct name of mksyscall script in comment

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

13 years agoruntime: include bootstrap m in mcpu accounting
Hector Chu [Tue, 25 Oct 2011 07:35:20 +0000 (08:35 +0100)]
runtime: include bootstrap m in mcpu accounting

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

13 years agohttp: doc typo
Brad Fitzpatrick [Tue, 25 Oct 2011 02:29:44 +0000 (19:29 -0700)]
http: doc typo

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

13 years agosyscall: use uintptr for Mount flags.
David Anderson [Tue, 25 Oct 2011 02:28:50 +0000 (19:28 -0700)]
syscall: use uintptr for Mount flags.

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

13 years agohtml: remove the Tokenizer.ReturnComments option.
Nigel Tao [Tue, 25 Oct 2011 00:28:07 +0000 (11:28 +1100)]
html: remove the Tokenizer.ReturnComments option.

The original intention was to simplify the parser, in making it skip
all comment tokens. However, checking that the Go html package is
100% compatible with the WebKit HTML test suite requires parsing the
comments. There is no longer any real benefit for the option.

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

13 years agoexp/ssh: introduce Session to replace Cmd for interactive commands
Dave Cheney [Mon, 24 Oct 2011 23:13:55 +0000 (19:13 -0400)]
exp/ssh: introduce Session to replace Cmd for interactive commands

This CL replaces the Cmd type with a Session type representing
interactive channels. This lays the foundation for supporting
other kinds of channels like direct-tcpip or x11.

client.go:
* replace chanlist map with slice.
* generalize stdout and stderr into a single type.
* unexport ClientChan to clientChan.

doc.go:
* update ServerConfig/ServerConn documentation.
* update Client example for Session.

message.go:
* make channelExtendedData more like channelData.

session.go:
* added Session which replaces Cmd.

R=agl, rsc, n13m3y3r, gustavo
CC=golang-dev
https://golang.org/cl/5302054

13 years agohtml: dump attributes when running parser tests.
Andrew Balholm [Mon, 24 Oct 2011 22:33:15 +0000 (09:33 +1100)]
html: dump attributes when running parser tests.

The WebKit test data shows attributes as though they were child nodes:

<a X>0<b>1<a Y>2
dumps as:
| <html>
|   <head>
|   <body>
|     <a>
|       x=""
|       "0"
|       <b>
|         "1"
|     <b>
|       <a>
|         y=""
|         "2"

So we need to do the same when dumping a tree to compare with it.

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

13 years agohttp: add package comment
Brad Fitzpatrick [Mon, 24 Oct 2011 20:59:31 +0000 (13:59 -0700)]
http: add package comment

Fixes #2378

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

13 years agonet: do not set SO_REUSEADDR for windows
Alex Brainman [Sun, 23 Oct 2011 22:11:01 +0000 (09:11 +1100)]
net: do not set SO_REUSEADDR for windows

Fixes #2307.

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

13 years agohtml: implement foster parenting
Andrew Balholm [Sun, 23 Oct 2011 07:36:01 +0000 (18:36 +1100)]
html: implement foster parenting

Implement the foster-parenting algorithm for content that is inside a table
but not in a cell.

Also fix a bug in reconstructing the active formatting elements.

Pass test 30 in tests1.dat:
<a><table><td><a><table></table><a></tr><a></table><b>X</b>C<a>Y

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

13 years agohtml: parse <select> tags.
Nigel Tao [Sat, 22 Oct 2011 09:18:12 +0000 (20:18 +1100)]
html: parse <select> tags.

The additional test case in parse_test.go is:
<select><b><option><select><option></b></select>X

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

13 years agobig: usable zero Rat values without need for explicit initialization
Robert Griesemer [Fri, 21 Oct 2011 21:11:36 +0000 (14:11 -0700)]
big: usable zero Rat values without need for explicit initialization

- no explicit API change, but new(big.Rat) now creates a big.Rat value
  of 0 that is immediately usable, in sync. w/ the conventions elsewhere
- various cleanups along the way

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

13 years agofmt: simplify the code some more by storing the field in the pp structure.
Rob Pike [Fri, 21 Oct 2011 20:59:27 +0000 (13:59 -0700)]
fmt: simplify the code some more by storing the field in the pp structure.

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

13 years agobig: implemented Rat.Inv
Robert Griesemer [Fri, 21 Oct 2011 20:26:00 +0000 (13:26 -0700)]
big: implemented Rat.Inv

Also:
- changed semantics of return values for [Int|Rat].SetString
  if an error occured (returned value is nil); will expose
  hidden errors where return values are not checked
- added more tests
- various cleanups throughout

Fixes #2384.

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

13 years agogotest: make it easier to get the help string
Rob Pike [Fri, 21 Oct 2011 18:16:46 +0000 (11:16 -0700)]
gotest: make it easier to get the help string
Because gotest's args are mingled with the tests, it's
hard to get the usage message to print. This CL adds
explicit support for -help, spelled several different ways.
Gotest has special flags like -file that are somewhat
hidden otherwise.

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

13 years agohttp: Transport: with TLS InsecureSkipVerify, skip hostname check
Brad Fitzpatrick [Fri, 21 Oct 2011 15:14:38 +0000 (08:14 -0700)]
http: Transport: with TLS InsecureSkipVerify, skip hostname check

Fixes #2386

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

13 years agoexp/ssh: server cleanups
Dave Cheney [Fri, 21 Oct 2011 15:04:28 +0000 (11:04 -0400)]
exp/ssh: server cleanups

server.go/channel.go:
* rename Server to ServerConfig to match Client.
* rename ServerConnection to ServeConn to match Client.
* add Listen/Listener.
* ServerConn.Handshake(), general cleanups.

client.go:
* fix bug where fmt.Error was not assigned to err

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

13 years agoexp/ssh: add experimental ssh client
Dave Cheney [Thu, 20 Oct 2011 19:44:45 +0000 (15:44 -0400)]
exp/ssh: add experimental ssh client

Requires CL 5285044

client.go:
* add Dial, ClientConn, ClientChan, ClientConfig and Cmd.

doc.go:
* add Client documentation.

server.go:
* adjust for readVersion change.

transport.go:
* return an os.Error not a bool from readVersion.

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

13 years agogo/ast: use single-element map in test
Robert Griesemer [Thu, 20 Oct 2011 19:37:13 +0000 (12:37 -0700)]
go/ast: use single-element map in test

Avoids test failure due to undefined map iteration order.

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

13 years agogo/ast, go/token: actually run tests; fix go/ast test
Ian Lance Taylor [Thu, 20 Oct 2011 17:30:01 +0000 (10:30 -0700)]
go/ast, go/token: actually run tests; fix go/ast test

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

13 years agoexp/winfsnotify: fix test
Hector Chu [Thu, 20 Oct 2011 07:10:58 +0000 (08:10 +0100)]
exp/winfsnotify: fix test

R=alex.brainman, mattn.jp
CC=golang-dev
https://golang.org/cl/5311047

13 years agohtml: parse and render comment nodes.
Nigel Tao [Thu, 20 Oct 2011 00:45:30 +0000 (11:45 +1100)]
html: parse and render comment nodes.

The first additional test case in parse_test.go is:
<!--><div>--<!-->

The second one is unrelated to the comment change, but also passes:
<p><hr></p>

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

13 years agomisc/vim: add highlighting for delete
Dave Cheney [Wed, 19 Oct 2011 20:30:06 +0000 (18:30 -0200)]
misc/vim: add highlighting for delete

R=golang-dev, n13m3y3r
CC=golang-dev
https://golang.org/cl/5303050

13 years agofmt: don't panic formatting nil interfaces
Gustavo Niemeyer [Wed, 19 Oct 2011 20:26:08 +0000 (18:26 -0200)]
fmt: don't panic formatting nil interfaces

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

13 years agogovet: check canonical dynamic method signatures
Russ Cox [Wed, 19 Oct 2011 20:06:16 +0000 (16:06 -0400)]
govet: check canonical dynamic method signatures

Adds check that, for example, a Scan method taking
a first argument of type fmt.ScanState has the correct
signature to satisfy fmt.Scanner.

Similarly, a ReadByte should return byte, os.Error.

These are important to check because various pieces
of code (fmt, gob, json, flate) do dynamic checks
for these methods, so code with incorrect signatures
would not be flagged at compile time.

These become even more important to check when
rune is introduced.

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

13 years agounicode: sort tables.go
Russ Cox [Wed, 19 Oct 2011 20:02:22 +0000 (16:02 -0400)]
unicode: sort tables.go

Makes tables.go output consistent across maketable runs.
(It was already inconsistent across architectures; the new
map iteration order just make it inconsistent across runs.)

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

13 years agocodereview: show LGTMs in hg p
Russ Cox [Wed, 19 Oct 2011 19:08:33 +0000 (15:08 -0400)]
codereview: show LGTMs in hg p

Shows first line of any response that the codereview server
has identified as an LGTM.  Example output below.

5305046:
        big: update for fmt interface changes

        Nothing terribly interesting here.

        Reviewer: gri@golang.org
                gri: LGTM
CC: golang-dev@googlegroups.com
        Files:
                src/pkg/big/int.go
                src/pkg/big/nat.go
                src/pkg/big/nat_test.go
                src/pkg/big/rat.go

5307044:
        exp/template/html: use rune

        Nothing terribly interesting here.

        Reviewer: mikesamuel@gmail.com, nigeltao@golang.org
                mikesamuel: I don't see a type def for rune.  Assuming that's a new intrinsic, LGTM.
CC: golang-dev@googlegroups.com
        Files:
                src/pkg/exp/template/html/css.go
                src/pkg/exp/template/html/css_test.go
                src/pkg/exp/template/html/html.go
                src/pkg/exp/template/html/js.go

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

13 years agogotest: use $GCFLAGS like make does
Russ Cox [Wed, 19 Oct 2011 17:10:23 +0000 (13:10 -0400)]
gotest: use $GCFLAGS like make does

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

13 years agoexp/types: fix crash in parseBasicType on unknown type
Russ Cox [Wed, 19 Oct 2011 16:49:01 +0000 (12:49 -0400)]
exp/types: fix crash in parseBasicType on unknown type

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

13 years agocrypto/x509: fix names in certificate generation.
Adam Langley [Wed, 19 Oct 2011 16:19:13 +0000 (12:19 -0400)]
crypto/x509: fix names in certificate generation.

I had a brain fart in af84b15fbae2 and messed up the names in
generated certificates.

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

13 years agohttp: comment tweaks
Brad Fitzpatrick [Wed, 19 Oct 2011 15:48:26 +0000 (08:48 -0700)]
http: comment tweaks

It hasn't been primitive in a while.

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

13 years agosyscall: update ztypes_linux_386 for terminal changes
Brad Fitzpatrick [Wed, 19 Oct 2011 15:45:38 +0000 (08:45 -0700)]
syscall: update ztypes_linux_386 for terminal changes

R=golang-dev, dave, iant
CC=golang-dev
https://golang.org/cl/5299045

13 years agosyscall: update ztypes_linux_arm for terminal changes
Dave Cheney [Wed, 19 Oct 2011 14:38:32 +0000 (07:38 -0700)]
syscall: update ztypes_linux_arm for terminal changes

regenerated on a debian sid arm5 host.

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

13 years agoos/inotify: move to exp/inotify
Mikio Hara [Wed, 19 Oct 2011 01:54:45 +0000 (10:54 +0900)]
os/inotify: move to exp/inotify

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

13 years agotag weekly.2011-10-18
Andrew Gerrand [Wed, 19 Oct 2011 00:51:32 +0000 (11:51 +1100)]
tag weekly.2011-10-18

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

13 years agoweekly.2011-10-18 weekly.2011-10-18
Andrew Gerrand [Wed, 19 Oct 2011 00:31:57 +0000 (11:31 +1100)]
weekly.2011-10-18

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

13 years agohtml: fix escape_test.go for CSS escaper change 5306042.
Nigel Tao [Tue, 18 Oct 2011 23:54:04 +0000 (10:54 +1100)]
html: fix escape_test.go for CSS escaper change 5306042.

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

13 years agofmt: clean up after reflect.Interface change.
Rob Pike [Tue, 18 Oct 2011 23:23:07 +0000 (16:23 -0700)]
fmt: clean up after reflect.Interface change.
Store the reflect.Value in the internal print state. Code is simpler, cleaner,
and a little faster - back to what it was before the change.

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5299046

13 years agorpc: don't panic on write error.
Rob Pike [Tue, 18 Oct 2011 22:52:49 +0000 (15:52 -0700)]
rpc: don't panic on write error.
The mechanism to record the error in the call is already in place.
Fixes #2382.

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

13 years agoexp/template/html: fix bug in cssEscaper
Mike Samuel [Tue, 18 Oct 2011 22:01:42 +0000 (17:01 -0500)]
exp/template/html: fix bug in cssEscaper

cssEscaper escapes using the CSS convention: `\` + hex + optional-space

It outputs the space when the escape could be followed by
a hex digit to distinguish a "\na" from "\u00aa".

It did not output a space when the escape is followed by a space
character so did not distinguish "\n " from "\n".

Currently when doing lookahead, it does not distinguish spaces that
will be escaped later by the same function from ones that will not.
This is correct but suboptimal.

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

13 years agohttp: add test for panic inside hijacked request
Andrew Gerrand [Tue, 18 Oct 2011 21:23:13 +0000 (08:23 +1100)]
http: add test for panic inside hijacked request

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

13 years agohtml: parse raw text and RCDATA elements, such as <script> and <title>.
Nigel Tao [Tue, 18 Oct 2011 21:03:30 +0000 (08:03 +1100)]
html: parse raw text and RCDATA elements, such as <script> and <title>.

Pass tests1.dat, test 26:
#data
<script><div></script></div><title><p></title><p><p>
#document
| <html>
|   <head>
|     <script>
|       "<div>"
|     <title>
|       "<p>"
|   <body>
|     <p>
|     <p>

Thanks to Andy Balholm for driving this change.

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

13 years agold: modify macho linkedit segment to enable OS X code signing
Mikkel Krautz [Tue, 18 Oct 2011 20:31:03 +0000 (16:31 -0400)]
ld: modify macho linkedit segment to enable OS X code signing

Move string table to the end of the __LINKEDIT segment.

This change allows Apple's codesign(1) utility to successfully sign
Go binaries, as long as they don't contain DWARF data (-w flag to
8l/6l).  This is because codesign(1) expects the string table to be
the last part of the file.

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

13 years agogodoc: generate package toc in template, not in JavaScript
Russ Cox [Tue, 18 Oct 2011 20:23:35 +0000 (16:23 -0400)]
godoc: generate package toc in template, not in JavaScript

1. Generate TOC for package pages using template,
instead of using JavaScript magic.  This makes the
pages generated by godoc -html easier to export
to other systems.

2. Make TOC one column.  It's hard to do two columns
portably without invoking JavaScript.

3. Since the TOC is only one column, show full type
signatures for functions and methods.  Many times
that's all you need to see anyway.

4. Name the section after the TOC "Overview".
Naming it something is important, to set it off
from the TOC and so that there's a quick link to
it in the TOC.

For now, some illustrative examples:

http://swtch.com:6060/pkg/io/
http://swtch.com:6060/pkg/strings/
http://swtch.com:6060/pkg/tabwriter/
http://swtch.com:6060/pkg/unicode/

Fixes #1982.

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

13 years agoexp/winfsnotify: filesystem watcher for Windows
Hector Chu [Tue, 18 Oct 2011 20:09:58 +0000 (21:09 +0100)]
exp/winfsnotify: filesystem watcher for Windows

R=rsc, alex.brainman, bradfitz
CC=bsiegert, go.peter.90, golang-dev
https://golang.org/cl/4188047

13 years ago5l, 6l, 8l: correct ELFRESERVE diagnostic
Anthony Martin [Tue, 18 Oct 2011 20:05:38 +0000 (16:05 -0400)]
5l, 6l, 8l: correct ELFRESERVE diagnostic

If the length of the interpreter string
pushes us over the ELFRESERVE limit, the
resulting error message will be comical.

I was doing some ELF tinkering with a
modified version of 8l when I hit this.

To be clear, the stock linkers wouldn't
hit this without adding about forty more
section headers.  We're safe for now. ;)

Also, remove a redundant call to cflush.

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

13 years ago6l, 8l: emit macho dwarf info before linkedit section
Mikkel Krautz [Tue, 18 Oct 2011 19:58:10 +0000 (15:58 -0400)]
6l, 8l: emit macho dwarf info before linkedit section

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

13 years agobig: handle aliasing correctly for Rat.SetFrac.
Robert Griesemer [Tue, 18 Oct 2011 19:40:41 +0000 (12:40 -0700)]
big: handle aliasing correctly for Rat.SetFrac.

Fixes #2379.

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

13 years agogc: preserve uint8 and byte distinction in errors, import data
Russ Cox [Tue, 18 Oct 2011 18:55:50 +0000 (14:55 -0400)]
gc: preserve uint8 and byte distinction in errors, import data

There is no semantic change here, just better errors.
If a function says it takes a byte, and you pass it an int,
the compiler error now says that you need a byte, not
that you need a uint8.

Groundwork for rune.

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

13 years ago5g, 6g: comment out uses of -r
Russ Cox [Tue, 18 Oct 2011 18:55:28 +0000 (14:55 -0400)]
5g, 6g: comment out uses of -r

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

13 years agobuild: pass $GCFLAGS to compiler
Russ Cox [Tue, 18 Oct 2011 18:55:10 +0000 (14:55 -0400)]
build: pass $GCFLAGS to compiler

For example, if you are debugging an optimization
problem you can now run

        GCFLAGS=-N gotest

This is a convention for make, not for the general build,
so it may go away or be done differently in the eventual
'go' command.

The plan is that people will be able to test their code for
rune safety by doing GCFLAGS=-r.

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

13 years agonet: remove duplicate error information in Dial
Andrey Mirtchovski [Tue, 18 Oct 2011 18:51:40 +0000 (14:51 -0400)]
net: remove duplicate error information in Dial

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

13 years agonet: allow LookupSRV on non-standard DNS names
Russ Cox [Tue, 18 Oct 2011 17:57:04 +0000 (13:57 -0400)]
net: allow LookupSRV on non-standard DNS names

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

13 years agoA+C: Jani Monoses (individual CLA)
Russ Cox [Tue, 18 Oct 2011 17:56:51 +0000 (13:56 -0400)]
A+C: Jani Monoses (individual CLA)

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

13 years agogodoc: fix ToAbsolute mapping
Robert Griesemer [Tue, 18 Oct 2011 17:28:30 +0000 (10:28 -0700)]
godoc: fix ToAbsolute mapping

The implementation of splitFirst was broken;
splitFirst("foo/") must be the same as splitFirst("foo").
As a result, ToAbsolute could be simplified, and as a side
effect this fixes a long-standing bug.

Thanks to Luca Greco <luca.greco@alcacoop.it> for doing
the investigation.

Fixes #1157.

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

13 years agohttp, crypto/tls: fix read timeouts and closing.
Adam Langley [Tue, 18 Oct 2011 16:59:32 +0000 (12:59 -0400)]
http, crypto/tls: fix read timeouts and closing.

tls.Conn.Close() didn't close the underlying connection and tried to
do a handshake in order to send the close notify alert.

http didn't look for errors from the TLS handshake.

Fixes #2281.

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

13 years agoexp/terminal: split terminal handling from exp/ssh
Adam Langley [Tue, 18 Oct 2011 16:58:57 +0000 (12:58 -0400)]
exp/terminal: split terminal handling from exp/ssh

This change splits terminal handling from exp/ssh, as suggested
several times in the ssh code review.

shell.go and shell_test.go are copies from exp/ssh with minimal
changes, so don't need another full review. A future CL will remove
that code from exp/ssh.

R=bradfitz, r, dave, rsc
CC=golang-dev
https://golang.org/cl/5278049

13 years agoexp/ssh: general cleanups for client support
Dave Cheney [Tue, 18 Oct 2011 16:54:48 +0000 (12:54 -0400)]
exp/ssh: general cleanups for client support

common.go:
* simplify findAgreedAlgorithms.
* add channelExtendedData support.

messages.go:
* add clientExtendedData.

server.go:
*  use simplified findAgreedAlgorithms.

server_shell.go:
* fix shadowed err return value.

transport.go:
* introduce separate cipher, mac and compression for each direction.
* added filteredConn and packetWriter interfaces.
* newTransport requires a source of randomness.

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

13 years agobig: more explicit documentation for div/mod/quo/rem
Robert Griesemer [Tue, 18 Oct 2011 16:45:38 +0000 (09:45 -0700)]
big: more explicit documentation for div/mod/quo/rem

Fixes #2380.

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

13 years agoreflect: make unsafe use of SliceHeader gc-friendly
Russ Cox [Tue, 18 Oct 2011 14:03:37 +0000 (10:03 -0400)]
reflect: make unsafe use of SliceHeader gc-friendly

Revert workaround in compiler and
revert test for compiler workaround.

Tested that the 386 build continues to fail if
the gc change is made without the reflect change.

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

13 years agogofix -r mapdelete
Russ Cox [Tue, 18 Oct 2011 13:56:34 +0000 (09:56 -0400)]
gofix -r mapdelete

R=golang-dev, r, adg, r, cw
CC=golang-dev
https://golang.org/cl/5266045

13 years agogofix: add mapdelete
Russ Cox [Tue, 18 Oct 2011 13:45:36 +0000 (09:45 -0400)]
gofix: add mapdelete

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

13 years agogc: add delete(m, x) but leave in m[x] = 0, false.
Russ Cox [Tue, 18 Oct 2011 13:41:32 +0000 (09:41 -0400)]
gc: add delete(m, x) but leave in m[x] = 0, false.

The old m[x] = 0, false syntax will be deleted
in a month or so, once people have had time to
change their code (there is a gofix in a separate CL).

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

13 years agomisc/windows: automated toolchain packager
Joe Poirier [Tue, 18 Oct 2011 04:51:45 +0000 (15:51 +1100)]
misc/windows: automated toolchain packager

A first run at fully automating the process.
This CL supersedes https://golang.org/cl/4634114/
which I seemed to have lost.

R=golang-dev, alex.brainman, adg
CC=golang-dev
https://golang.org/cl/5273041

13 years agold: bump pe linker version to 3.0 to allow code signing
Mikkel Krautz [Tue, 18 Oct 2011 04:31:55 +0000 (15:31 +1100)]
ld: bump pe linker version to 3.0 to allow code signing

The Windows signtool.exe thinks our binaries are 'invalid
Win32 programs' unless the PE linker version field is 3.0
or greater.

This minor change makes it possible to successfully sign
gc-built binaries on Windows.

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

13 years agotag release.r58.2
Andrew Gerrand [Tue, 18 Oct 2011 03:10:41 +0000 (14:10 +1100)]
tag release.r58.2

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

13 years agoreflect: make map test independent of map iteration order.
David Symonds [Tue, 18 Oct 2011 01:47:34 +0000 (12:47 +1100)]
reflect: make map test independent of map iteration order.

This should fix the 386 builds.

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

13 years agoreflect: fix test failure reporting.
David Symonds [Tue, 18 Oct 2011 01:26:09 +0000 (12:26 +1100)]
reflect: fix test failure reporting.

There's a problem that is manifesting on the 386 builders,
but this test bug is masking it.

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

13 years agofmt: fix test relying on map iteration order.
David Symonds [Tue, 18 Oct 2011 00:47:11 +0000 (11:47 +1100)]
fmt: fix test relying on map iteration order.

This fixes the 386 builds.

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

13 years agotag release.r60.3
Andrew Gerrand [Tue, 18 Oct 2011 00:35:58 +0000 (11:35 +1100)]
tag release.r60.3

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

13 years agomisc/swig: delete binaries
Anthony Martin [Mon, 17 Oct 2011 23:47:52 +0000 (16:47 -0700)]
misc/swig: delete binaries

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5273045