1
0
mirror of https://github.com/golang/go synced 2024-11-18 10:54:40 -07:00
go/src
Yasuharu Goto dab143c882 net/http: Client support for Expect: 100-continue
Current http client doesn't support Expect: 100-continue request
header(RFC2616-8/RFC7231-5.1.1). So even if the client have the header,
the head of the request body is consumed prematurely.

Those are my intentions to avoid premature consuming body in this change.
- If http.Request header contains body and Expect: 100-continue
  header, it blocks sending body until it gets the first response.
- If the first status code to the request were 100, the request
  starts sending body. Otherwise, sending body will be cancelled.
- Tranport.ExpectContinueTimeout specifies the amount of the time to
  wait for the first response.

Fixes #3665

Change-Id: I4c04f7d88573b08cabd146c4e822061764a7cd1f
Reviewed-on: https://go-review.googlesource.com/10091
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-10-17 00:44:46 +00:00
..
archive archive/tar: fix numeric overflow issues in readGNUSparseMap0x1 2015-10-06 17:49:05 +00:00
bufio bufio: fix scanning with a final empty token. 2015-09-25 21:46:13 +00:00
builtin
bytes bytes: improve Compare function on amd64 for large byte arrays 2015-08-26 03:52:20 +00:00
cmd cmd/compile/internal/gc: reject invalid unsafe.Sizeof([0]byte{}[0]) 2015-10-15 20:56:58 +00:00
compress compress/gzip: fix go vet warning 2015-10-14 17:54:30 +00:00
container
crypto crypto/x509: parse CSRs with a critical flag in the requested extensions. 2015-09-30 00:59:15 +00:00
database/sql database/sql: avoid deadlock waiting for connections 2015-10-16 15:17:03 +00:00
debug debug/gosym: clean up and modernize pclntab_test 2015-10-07 17:01:59 +00:00
encoding encoding/json: simplify encodeState.{string, stringBytes} 2015-10-14 23:29:14 +00:00
errors
expvar
flag
fmt fmt: allow any type in a format's width argument 2015-09-10 20:53:22 +00:00
go net/http: enable automatic HTTP/2 if TLSNextProto is nil 2015-10-14 23:21:57 +00:00
hash hash/crc32: add AMD64 optimized IEEE CRC calculation 2015-09-16 15:42:42 +00:00
html text/template: change IsTrue to take interface{} instead of reflect.Value. 2015-10-01 04:36:35 +00:00
image image: add NYCbCrA types. 2015-10-11 11:07:25 +00:00
index/suffixarray
internal go/format, cmd/gofmt: avoid dependency on internal package format 2015-09-30 16:32:47 +00:00
io io: simplify documentation for ByteReader 2015-10-06 02:21:29 +00:00
log
math math: Modf(-0) returns -0,-0 2015-10-09 17:09:16 +00:00
mime mime: limit UTF-8 encoded-word length to 75 characters 2015-10-15 00:08:03 +00:00
net net/http: Client support for Expect: 100-continue 2015-10-17 00:44:46 +00:00
os runtime, os/signal: use //go:linkname instead of assembly stubs to get access to runtime functions 2015-10-16 07:11:04 +00:00
path
reflect runtime: on map update, don't overwrite key if we don't need to. 2015-09-09 21:06:49 +00:00
regexp regexp: add runnable example to regex.Split 2015-09-23 03:29:32 +00:00
runtime runtime: remove some unnecessary unsafe code in mfixalloc 2015-10-17 00:26:26 +00:00
sort
strconv strconv: slightly simplified roundShortest; better comments 2015-09-23 21:14:29 +00:00
strings
sync
syscall syscall: fix nacl listener to not accept connections once closed 2015-10-16 14:43:17 +00:00
testing testing/quick: terminate for arbitrary recursive types 2015-08-29 19:23:37 +00:00
text text/template: resolve non-empty interface 2015-10-15 05:02:27 +00:00
time time: allow any one- or two-digit day of the month when parsing. 2015-09-10 20:27:53 +00:00
unicode
unsafe
vendor/golang.org/x/net/http2/hpack vendor: import golang.org/x/net/http2 2015-10-14 23:21:40 +00:00
all.bash
all.bat
all.rc
androidtest.bash
bootstrap.bash build: Fix bootstrap.bash for official source tarballs 2015-09-01 19:52:59 +00:00
buildall.bash
clean.bash
clean.bat
clean.rc
iostest.bash
make.bash
make.bat
Make.dist
make.rc
nacltest.bash
race.bash
race.bat
run.bash
run.bat
run.rc