NewRequest will save a lot of boilerplate code.
This also updates some docs on Request.Write and
adds some tests.
R=rsc, petar-m, r
CC=golang-dev
https://golang.org/cl/4406047
Don't use the rewrite rule from a previous test
for the next test if there is no rewrite rule
provided.
R=r, r2
CC=golang-dev
https://golang.org/cl/4419045
The new reflection API makes it an error to call value.Set(x)
if x is invalid. Guard for it.
Added corresponding test case.
Fixes#1696.
R=rsc, r
CC=golang-dev
https://golang.org/cl/4398047
Ubuntu and/or GNOME have some bug that likes
to set the "http_proxy" environment variable
and forgets to unset it. This is annoying
to debug. Be clear in the error message that
a proxy was in use.
R=rsc
CC=golang-dev
https://golang.org/cl/4409045
. Missing declaration of runtime.brk_();
. Argument v in runtime.SysReserve() is not used;
(I'd prefer a Plan 9-type solution...)
R=golang-dev, r, r2
CC=golang-dev
https://golang.org/cl/4368076
We already had support on the client side. I also changed the name of
the flag in the ServerHello structure to match the name of the same
flag in the ClientHello (ocspStapling).
R=bradfitzgo
CC=golang-dev
https://golang.org/cl/4408044
This fixes our http behavior (even if Handlers forget to
consume a request body, we do it for them before we send
their response header), fixes the racy TestServerExpect,
and adds TestServerConsumesRequestBody.
With GOMAXPROCS>1, the http tests now seem race-free.
R=rsc
CC=golang-dev
https://golang.org/cl/4419042
The list elements are already being allocated out of a
single memory buffer. We can drop the Link* pointer
following and the memory it requires, replacing it with
index operations.
The change also keeps a channel from containing a pointer
back into its own allocation block, which would create a
cycle. Blocks involved in cycles are not guaranteed to be
finalized properly, and channels depend on finalizers to
free OS-level locks on some systems. The self-reference
was keeping channels from being garbage collected.
runtime-gdb.py will need to be updated in order to dump
the content of buffered channels with the new data structure.
Fixes#1676.
R=ken2, r
CC=golang-dev
https://golang.org/cl/4411045
This mostly adds Expect 100-continue tests (from
the perspective of server correctness) that were
missing before.
It also fixes a few missing cases that will
probably never come up in practice, but it's nice
to have handled correctly.
Proper 100-continue client support remains a TODO.
R=rsc, bradfitzwork
CC=golang-dev
https://golang.org/cl/4399044
- replaced existing testdata/test.sh with new gofmt_test
- added initial test case for rewrite tests
TODO: Need to add more tests.
R=rsc
CC=golang-dev
https://golang.org/cl/4368063