Last active
June 12, 2020 21:20
Patch-ish for golang#34902
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2020 The Go Authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style | |
// license that can be found in the LICENSE file. | |
package http | |
import ( | |
"bufio" | |
"io" | |
"sync" | |
) | |
// bufferedWriter is an interface for bufio.Writer and makes it trivial | |
// to replace bufio.Writer with its wrapper, safeWriter. | |
type bufferedWriter interface { | |
Size() int | |
Reset(io.Writer) | |
Flush() error | |
Available() int | |
Buffered() int | |
Write([]byte) (int, error) | |
WriteByte(byte) error | |
WriteRune(rune) (int, error) | |
WriteString(string) (int, error) | |
ReadFrom(io.Reader) (int64, error) | |
} | |
// safeWriter is a wrapper around bufio.Writer and is used to avoid data | |
// races that occur when 100-continue is sent. | |
type safeWriter struct { | |
sync.Mutex | |
*bufio.Writer | |
} | |
func (b *safeWriter) Size() int { | |
b.Lock() | |
defer b.Unlock() | |
return b.Writer.Size() | |
} | |
func (b *safeWriter) Reset(w io.Writer) { | |
b.Lock() | |
defer b.Unlock() | |
b.Writer.Reset(w) | |
} | |
func (b *safeWriter) Flush() error { | |
b.Lock() | |
defer b.Unlock() | |
return b.Writer.Flush() | |
} | |
func (b *safeWriter) Available() int { | |
b.Lock() | |
defer b.Unlock() | |
return b.Writer.Available() | |
} | |
func (b *safeWriter) Buffered() int { | |
b.Lock() | |
defer b.Unlock() | |
return b.Writer.Buffered() | |
} | |
func (b *safeWriter) Write(p []byte) (nn int, err error) { | |
b.Lock() | |
defer b.Unlock() | |
return b.Writer.Write(p) | |
} | |
func (b *safeWriter) WriteByte(c byte) error { | |
b.Lock() | |
defer b.Unlock() | |
return b.Writer.WriteByte(c) | |
} | |
func (b *safeWriter) WriteRune(r rune) (size int, err error) { | |
b.Lock() | |
defer b.Unlock() | |
return b.Writer.WriteRune(r) | |
} | |
func (b *safeWriter) WriteString(s string) (int, error) { | |
b.Lock() | |
defer b.Unlock() | |
return b.Writer.WriteString(s) | |
} | |
func (b *safeWriter) ReadFrom(r io.Reader) (n int64, err error) { | |
b.Lock() | |
defer b.Unlock() | |
return b.Writer.ReadFrom(r) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ go test -v net/http/httputil | |
=== RUN TestDumpRequest | |
--- PASS: TestDumpRequest (0.00s) | |
=== RUN TestDumpResponse | |
--- PASS: TestDumpResponse (0.00s) | |
=== RUN TestReverseProxy | |
--- PASS: TestReverseProxy (0.11s) | |
=== RUN TestReverseProxyStripHeadersPresentInConnection | |
--- PASS: TestReverseProxyStripHeadersPresentInConnection (0.04s) | |
=== RUN TestXForwardedFor | |
--- PASS: TestXForwardedFor (0.03s) | |
=== RUN TestReverseProxyQuery | |
--- PASS: TestReverseProxyQuery (0.13s) | |
=== RUN TestReverseProxyFlushInterval | |
--- PASS: TestReverseProxyFlushInterval (0.04s) | |
=== RUN TestReverseProxyFlushIntervalHeaders | |
--- PASS: TestReverseProxyFlushIntervalHeaders (0.04s) | |
=== RUN TestReverseProxyCancelation | |
--- PASS: TestReverseProxyCancelation (0.06s) | |
=== RUN TestNilBody | |
--- PASS: TestNilBody (0.04s) | |
=== RUN TestUserAgentHeader | |
--- PASS: TestUserAgentHeader (0.07s) | |
=== RUN TestReverseProxyGetPutBuffer | |
--- PASS: TestReverseProxyGetPutBuffer (0.03s) | |
=== RUN TestReverseProxy_Post | |
--- PASS: TestReverseProxy_Post (1.03s) | |
=== RUN TestReverseProxy_NilBody | |
--- PASS: TestReverseProxy_NilBody (0.02s) | |
=== RUN TestReverseProxy_AllocatedHeader | |
--- PASS: TestReverseProxy_AllocatedHeader (0.00s) | |
=== RUN TestReverseProxyModifyResponse | |
--- PASS: TestReverseProxyModifyResponse (0.04s) | |
=== RUN TestReverseProxyErrorHandler | |
=== RUN TestReverseProxyErrorHandler/default | |
=== RUN TestReverseProxyErrorHandler/errorhandler | |
=== RUN TestReverseProxyErrorHandler/modifyresponse_noerr | |
=== RUN TestReverseProxyErrorHandler/modifyresponse_err | |
--- PASS: TestReverseProxyErrorHandler (0.08s) | |
--- PASS: TestReverseProxyErrorHandler/default (0.01s) | |
--- PASS: TestReverseProxyErrorHandler/errorhandler (0.02s) | |
--- PASS: TestReverseProxyErrorHandler/modifyresponse_noerr (0.02s) | |
--- PASS: TestReverseProxyErrorHandler/modifyresponse_err (0.03s) | |
=== RUN TestReverseProxy_CopyBuffer | |
--- PASS: TestReverseProxy_CopyBuffer (0.04s) | |
=== RUN TestServeHTTPDeepCopy | |
--- PASS: TestServeHTTPDeepCopy (0.03s) | |
=== RUN TestClonesRequestHeaders | |
--- PASS: TestClonesRequestHeaders (0.00s) | |
=== RUN TestModifyResponseClosesBody | |
--- PASS: TestModifyResponseClosesBody (0.00s) | |
=== RUN TestReverseProxy_PanicBodyError | |
--- PASS: TestReverseProxy_PanicBodyError (0.03s) | |
=== RUN TestSelectFlushInterval | |
=== RUN TestSelectFlushInterval/default | |
=== RUN TestSelectFlushInterval/server-sent_events_overrides_non-zero | |
=== RUN TestSelectFlushInterval/server-sent_events_overrides_zero | |
--- PASS: TestSelectFlushInterval (0.00s) | |
--- PASS: TestSelectFlushInterval/default (0.00s) | |
--- PASS: TestSelectFlushInterval/server-sent_events_overrides_non-zero (0.00s) | |
--- PASS: TestSelectFlushInterval/server-sent_events_overrides_zero (0.00s) | |
=== RUN TestReverseProxyWebSocket | |
--- PASS: TestReverseProxyWebSocket (0.03s) | |
=== RUN TestUnannouncedTrailer | |
--- PASS: TestUnannouncedTrailer (0.05s) | |
=== RUN TestSingleJoinSlash | |
--- PASS: TestSingleJoinSlash (0.00s) | |
=== RUN ExampleDumpRequest | |
--- PASS: ExampleDumpRequest (0.03s) | |
=== RUN ExampleDumpRequestOut | |
--- PASS: ExampleDumpRequestOut (0.00s) | |
=== RUN ExampleDumpResponse | |
--- PASS: ExampleDumpResponse (0.01s) | |
=== RUN ExampleReverseProxy | |
--- PASS: ExampleReverseProxy (0.05s) | |
PASS | |
ok net/http/httputil 4.064s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ go test -v net/http | |
=== RUN TestWriteSetCookies | |
--- PASS: TestWriteSetCookies (0.00s) | |
=== RUN TestSetCookie | |
--- PASS: TestSetCookie (0.00s) | |
=== RUN TestAddCookie | |
--- PASS: TestAddCookie (0.00s) | |
=== RUN TestReadSetCookies | |
--- PASS: TestReadSetCookies (0.00s) | |
=== RUN TestReadCookies | |
--- PASS: TestReadCookies (0.00s) | |
=== RUN TestSetCookieDoubleQuotes | |
--- PASS: TestSetCookieDoubleQuotes (0.00s) | |
=== RUN TestCookieSanitizeValue | |
--- PASS: TestCookieSanitizeValue (0.00s) | |
=== RUN TestCookieSanitizePath | |
--- PASS: TestCookieSanitizePath (0.00s) | |
=== RUN TestFileTransport | |
--- PASS: TestFileTransport (0.01s) | |
=== RUN TestHeaderWrite | |
--- PASS: TestHeaderWrite (0.00s) | |
=== RUN TestParseTime | |
--- PASS: TestParseTime (0.00s) | |
=== RUN TestHasToken | |
--- PASS: TestHasToken (0.00s) | |
=== RUN TestNilHeaderClone | |
--- PASS: TestNilHeaderClone (0.00s) | |
=== RUN TestHeaderWriteSubsetAllocs | |
TestHeaderWriteSubsetAllocs: header_test.go:213: skipping; GOMAXPROCS>1 | |
--- SKIP: TestHeaderWriteSubsetAllocs (0.00s) | |
=== RUN TestCloneOrMakeHeader | |
=== RUN TestCloneOrMakeHeader/nil | |
=== RUN TestCloneOrMakeHeader/empty | |
=== RUN TestCloneOrMakeHeader/non-empty | |
--- PASS: TestCloneOrMakeHeader (0.00s) | |
--- PASS: TestCloneOrMakeHeader/nil (0.00s) | |
--- PASS: TestCloneOrMakeHeader/empty (0.00s) | |
--- PASS: TestCloneOrMakeHeader/non-empty (0.00s) | |
=== RUN TestForeachHeaderElement | |
--- PASS: TestForeachHeaderElement (0.00s) | |
=== RUN TestCleanHost | |
--- PASS: TestCleanHost (0.00s) | |
=== RUN TestCmdGoNoHTTPServer | |
=== PAUSE TestCmdGoNoHTTPServer | |
=== RUN TestOmitHTTP2 | |
=== PAUSE TestOmitHTTP2 | |
=== RUN TestOmitHTTP2Vet | |
=== PAUSE TestOmitHTTP2Vet | |
=== RUN TestCacheKeys | |
--- PASS: TestCacheKeys (0.00s) | |
=== RUN TestParseRange | |
--- PASS: TestParseRange (0.00s) | |
=== RUN TestReadRequest | |
--- PASS: TestReadRequest (0.00s) | |
=== RUN TestReadRequest_Bad | |
--- PASS: TestReadRequest_Bad (0.00s) | |
=== RUN TestRequestWrite | |
--- PASS: TestRequestWrite (0.00s) | |
=== RUN TestRequestWriteTransport | |
=== PAUSE TestRequestWriteTransport | |
=== RUN TestRequestWriteClosesBody | |
--- PASS: TestRequestWriteClosesBody (0.00s) | |
=== RUN TestRequestWriteError | |
--- PASS: TestRequestWriteError (0.00s) | |
=== RUN TestReadResponse | |
--- PASS: TestReadResponse (0.00s) | |
=== RUN TestWriteResponse | |
--- PASS: TestWriteResponse (0.00s) | |
=== RUN TestReadResponseCloseInMiddle | |
=== PAUSE TestReadResponseCloseInMiddle | |
=== RUN TestLocationResponse | |
--- PASS: TestLocationResponse (0.00s) | |
=== RUN TestResponseStatusStutter | |
--- PASS: TestResponseStatusStutter (0.00s) | |
=== RUN TestResponseContentLengthShortBody | |
--- PASS: TestResponseContentLengthShortBody (0.00s) | |
=== RUN TestReadResponseErrors | |
--- PASS: TestReadResponseErrors (0.00s) | |
=== RUN TestNeedsSniff | |
--- PASS: TestNeedsSniff (0.00s) | |
=== RUN TestResponseWritesOnlySingleConnectionClose | |
--- PASS: TestResponseWritesOnlySingleConnectionClose (0.00s) | |
=== RUN TestResponseWrite | |
--- PASS: TestResponseWrite (0.00s) | |
=== RUN TestBodyReadBadTrailer | |
--- PASS: TestBodyReadBadTrailer (0.00s) | |
=== RUN TestFinalChunkedBodyReadEOF | |
--- PASS: TestFinalChunkedBodyReadEOF (0.00s) | |
=== RUN TestDetectInMemoryReaders | |
--- PASS: TestDetectInMemoryReaders (0.00s) | |
=== RUN TestTransferWriterWriteBodyReaderTypes | |
=== RUN TestTransferWriterWriteBodyReaderTypes/file,_non-chunked,_size_set | |
=== RUN TestTransferWriterWriteBodyReaderTypes/file,_non-chunked,_size_set,_nopCloser_wrapped | |
=== RUN TestTransferWriterWriteBodyReaderTypes/file,_non-chunked,_negative_size | |
=== RUN TestTransferWriterWriteBodyReaderTypes/file,_non-chunked,_CONNECT,_negative_size | |
=== RUN TestTransferWriterWriteBodyReaderTypes/file,_chunked | |
=== RUN TestTransferWriterWriteBodyReaderTypes/buffer,_non-chunked,_size_set | |
=== RUN TestTransferWriterWriteBodyReaderTypes/buffer,_non-chunked,_size_set,_nopCloser_wrapped | |
=== RUN TestTransferWriterWriteBodyReaderTypes/buffer,_non-chunked,_negative_size | |
=== RUN TestTransferWriterWriteBodyReaderTypes/buffer,_non-chunked,_CONNECT,_negative_size | |
=== RUN TestTransferWriterWriteBodyReaderTypes/buffer,_chunked | |
--- PASS: TestTransferWriterWriteBodyReaderTypes (0.00s) | |
--- PASS: TestTransferWriterWriteBodyReaderTypes/file,_non-chunked,_size_set (0.00s) | |
--- PASS: TestTransferWriterWriteBodyReaderTypes/file,_non-chunked,_size_set,_nopCloser_wrapped (0.00s) | |
--- PASS: TestTransferWriterWriteBodyReaderTypes/file,_non-chunked,_negative_size (0.00s) | |
--- PASS: TestTransferWriterWriteBodyReaderTypes/file,_non-chunked,_CONNECT,_negative_size (0.00s) | |
--- PASS: TestTransferWriterWriteBodyReaderTypes/file,_chunked (0.00s) | |
--- PASS: TestTransferWriterWriteBodyReaderTypes/buffer,_non-chunked,_size_set (0.00s) | |
--- PASS: TestTransferWriterWriteBodyReaderTypes/buffer,_non-chunked,_size_set,_nopCloser_wrapped (0.00s) | |
--- PASS: TestTransferWriterWriteBodyReaderTypes/buffer,_non-chunked,_negative_size (0.00s) | |
--- PASS: TestTransferWriterWriteBodyReaderTypes/buffer,_non-chunked,_CONNECT,_negative_size (0.00s) | |
--- PASS: TestTransferWriterWriteBodyReaderTypes/buffer,_chunked (0.00s) | |
=== RUN TestFixTransferEncoding | |
--- PASS: TestFixTransferEncoding (0.00s) | |
=== RUN TestTransportPersistConnReadLoopEOF | |
--- PASS: TestTransportPersistConnReadLoopEOF (0.03s) | |
=== RUN TestTransportShouldRetryRequest | |
--- PASS: TestTransportShouldRetryRequest (0.00s) | |
=== RUN TestTransportBodyAltRewind | |
--- PASS: TestTransportBodyAltRewind (0.06s) | |
=== RUN TestNextProtoUpgrade | |
--- PASS: TestNextProtoUpgrade (0.09s) | |
=== RUN TestClient | |
--- PASS: TestClient (0.02s) | |
=== RUN TestClientHead_h1 | |
--- PASS: TestClientHead_h1 (0.03s) | |
=== RUN TestClientHead_h2 | |
--- PASS: TestClientHead_h2 (0.05s) | |
=== RUN TestGetRequestFormat | |
--- PASS: TestGetRequestFormat (0.00s) | |
=== RUN TestPostRequestFormat | |
--- PASS: TestPostRequestFormat (0.00s) | |
=== RUN TestPostFormRequestFormat | |
--- PASS: TestPostFormRequestFormat (0.00s) | |
=== RUN TestClientRedirects | |
--- PASS: TestClientRedirects (0.25s) | |
=== RUN TestClientRedirectContext | |
--- PASS: TestClientRedirectContext (0.03s) | |
=== RUN TestPostRedirects | |
--- PASS: TestPostRedirects (0.07s) | |
=== RUN TestDeleteRedirects | |
--- PASS: TestDeleteRedirects (0.09s) | |
=== RUN TestClientRedirectUseResponse | |
--- PASS: TestClientRedirectUseResponse (0.03s) | |
=== RUN TestClientRedirect308NoLocation | |
--- PASS: TestClientRedirect308NoLocation (0.03s) | |
=== RUN TestClientRedirect308NoGetBody | |
--- PASS: TestClientRedirect308NoGetBody (0.03s) | |
=== RUN TestClientSendsCookieFromJar | |
--- PASS: TestClientSendsCookieFromJar (0.00s) | |
=== RUN TestRedirectCookiesJar | |
--- PASS: TestRedirectCookiesJar (0.04s) | |
=== RUN TestJarCalls | |
--- PASS: TestJarCalls (0.05s) | |
=== RUN TestStreamingGet_h1 | |
--- PASS: TestStreamingGet_h1 (0.02s) | |
=== RUN TestStreamingGet_h2 | |
--- PASS: TestStreamingGet_h2 (0.04s) | |
=== RUN TestClientWrites | |
--- PASS: TestClientWrites (0.02s) | |
=== RUN TestClientInsecureTransport | |
--- PASS: TestClientInsecureTransport (0.36s) | |
=== RUN TestClientErrorWithRequestURI | |
--- PASS: TestClientErrorWithRequestURI (0.00s) | |
=== RUN TestClientWithCorrectTLSServerName | |
--- PASS: TestClientWithCorrectTLSServerName (0.03s) | |
=== RUN TestClientWithIncorrectTLSServerName | |
--- PASS: TestClientWithIncorrectTLSServerName (0.03s) | |
=== RUN TestTransportUsesTLSConfigServerName | |
--- PASS: TestTransportUsesTLSConfigServerName (0.03s) | |
=== RUN TestResponseSetsTLSConnectionState | |
--- PASS: TestResponseSetsTLSConnectionState (0.03s) | |
=== RUN TestHTTPSClientDetectsHTTPServer | |
--- PASS: TestHTTPSClientDetectsHTTPServer (0.02s) | |
=== RUN TestClientHeadContentLength_h1 | |
--- PASS: TestClientHeadContentLength_h1 (0.02s) | |
=== RUN TestClientHeadContentLength_h2 | |
--- PASS: TestClientHeadContentLength_h2 (0.03s) | |
=== RUN TestEmptyPasswordAuth | |
--- PASS: TestEmptyPasswordAuth (0.02s) | |
=== RUN TestBasicAuth | |
--- PASS: TestBasicAuth (0.00s) | |
=== RUN TestBasicAuthHeadersPreserved | |
--- PASS: TestBasicAuthHeadersPreserved (0.00s) | |
=== RUN TestStripPasswordFromError | |
=== RUN TestStripPasswordFromError/Strip_password_from_error_message | |
=== RUN TestStripPasswordFromError/Don't_Strip_password_from_domain_name | |
=== RUN TestStripPasswordFromError/Don't_Strip_password_from_path | |
=== RUN TestStripPasswordFromError/Strip_escaped_password | |
--- PASS: TestStripPasswordFromError (0.00s) | |
--- PASS: TestStripPasswordFromError/Strip_password_from_error_message (0.00s) | |
--- PASS: TestStripPasswordFromError/Don't_Strip_password_from_domain_name (0.00s) | |
--- PASS: TestStripPasswordFromError/Don't_Strip_password_from_path (0.00s) | |
--- PASS: TestStripPasswordFromError/Strip_escaped_password (0.00s) | |
=== RUN TestClientTimeout_h1 | |
--- PASS: TestClientTimeout_h1 (0.21s) | |
=== RUN TestClientTimeout_h2 | |
--- PASS: TestClientTimeout_h2 (0.21s) | |
=== RUN TestClientTimeout_Headers_h1 | |
--- PASS: TestClientTimeout_Headers_h1 (0.02s) | |
=== RUN TestClientTimeout_Headers_h2 | |
--- PASS: TestClientTimeout_Headers_h2 (0.01s) | |
=== RUN TestClientTimeoutCancel | |
--- PASS: TestClientTimeoutCancel (0.02s) | |
=== RUN TestClientRedirectEatsBody_h1 | |
--- PASS: TestClientRedirectEatsBody_h1 (0.04s) | |
=== RUN TestClientRedirectEatsBody_h2 | |
--- PASS: TestClientRedirectEatsBody_h2 (0.04s) | |
=== RUN TestReferer | |
--- PASS: TestReferer (0.00s) | |
=== RUN TestClientRedirectResponseWithoutRequest | |
--- PASS: TestClientRedirectResponseWithoutRequest (0.00s) | |
=== RUN TestClientCopyHeadersOnRedirect | |
--- PASS: TestClientCopyHeadersOnRedirect (0.04s) | |
=== RUN TestClientCopyHostOnRedirect | |
TestClientCopyHostOnRedirect: client_test.go:1539: Virtual host is 127.0.0.1:50742 | |
TestClientCopyHostOnRedirect: client_test.go:1581: Server host is 127.0.0.1:50746 | |
--- PASS: TestClientCopyHostOnRedirect (0.04s) | |
=== RUN TestClientAltersCookiesOnRedirect | |
--- PASS: TestClientAltersCookiesOnRedirect (0.03s) | |
=== RUN TestShouldCopyHeaderOnRedirect | |
--- PASS: TestShouldCopyHeaderOnRedirect (0.00s) | |
=== RUN TestClientRedirectTypes | |
--- PASS: TestClientRedirectTypes (0.09s) | |
=== RUN TestTransportBodyReadError | |
--- PASS: TestTransportBodyReadError (0.03s) | |
=== RUN TestClientCloseIdleConnections | |
--- PASS: TestClientCloseIdleConnections (0.00s) | |
=== RUN TestClientPropagatesTimeoutToContext | |
TestClientPropagatesTimeoutToContext: client_test.go:1931: deadline in 5s | |
--- PASS: TestClientPropagatesTimeoutToContext (0.00s) | |
=== RUN TestClientDoCanceledVsTimeout_h1 | |
=== RUN TestClientDoCanceledVsTimeout_h1/timeout | |
=== RUN TestClientDoCanceledVsTimeout_h1/canceled | |
--- PASS: TestClientDoCanceledVsTimeout_h1 (0.01s) | |
--- PASS: TestClientDoCanceledVsTimeout_h1/timeout (0.00s) | |
--- PASS: TestClientDoCanceledVsTimeout_h1/canceled (0.00s) | |
=== RUN TestClientDoCanceledVsTimeout_h2 | |
=== RUN TestClientDoCanceledVsTimeout_h2/timeout | |
=== RUN TestClientDoCanceledVsTimeout_h2/canceled | |
--- PASS: TestClientDoCanceledVsTimeout_h2 (0.01s) | |
--- PASS: TestClientDoCanceledVsTimeout_h2/timeout (0.00s) | |
--- PASS: TestClientDoCanceledVsTimeout_h2/canceled (0.00s) | |
=== RUN TestNewClientServerTest | |
--- PASS: TestNewClientServerTest (0.05s) | |
=== RUN TestChunkedResponseHeaders_h1 | |
--- PASS: TestChunkedResponseHeaders_h1 (0.02s) | |
=== RUN TestChunkedResponseHeaders_h2 | |
--- PASS: TestChunkedResponseHeaders_h2 (0.04s) | |
=== RUN TestH12_HeadContentLengthNoBody | |
--- PASS: TestH12_HeadContentLengthNoBody (0.06s) | |
=== RUN TestH12_HeadContentLengthSmallBody | |
--- PASS: TestH12_HeadContentLengthSmallBody (0.06s) | |
=== RUN TestH12_HeadContentLengthLargeBody | |
--- PASS: TestH12_HeadContentLengthLargeBody (0.07s) | |
=== RUN TestH12_200NoBody | |
--- PASS: TestH12_200NoBody (0.07s) | |
=== RUN TestH2_204NoBody | |
--- PASS: TestH2_204NoBody (0.07s) | |
=== RUN TestH2_304NoBody | |
--- PASS: TestH2_304NoBody (0.06s) | |
=== RUN TestH2_404NoBody | |
--- PASS: TestH2_404NoBody (0.06s) | |
=== RUN TestH12_SmallBody | |
--- PASS: TestH12_SmallBody (0.05s) | |
=== RUN TestH12_ExplicitContentLength | |
--- PASS: TestH12_ExplicitContentLength (0.06s) | |
=== RUN TestH12_FlushBeforeBody | |
--- PASS: TestH12_FlushBeforeBody (0.05s) | |
=== RUN TestH12_FlushMidBody | |
--- PASS: TestH12_FlushMidBody (0.06s) | |
=== RUN TestH12_Head_ExplicitLen | |
--- PASS: TestH12_Head_ExplicitLen (0.07s) | |
=== RUN TestH12_Head_ImplicitLen | |
--- PASS: TestH12_Head_ImplicitLen (0.08s) | |
=== RUN TestH12_HandlerWritesTooLittle | |
--- PASS: TestH12_HandlerWritesTooLittle (0.07s) | |
=== RUN TestH12_HandlerWritesTooMuch | |
--- PASS: TestH12_HandlerWritesTooMuch (0.05s) | |
=== RUN TestH12_AutoGzip | |
--- PASS: TestH12_AutoGzip (0.06s) | |
=== RUN TestH12_AutoGzip_Disabled | |
--- PASS: TestH12_AutoGzip_Disabled (0.06s) | |
=== RUN Test304Responses_h1 | |
--- PASS: Test304Responses_h1 (0.03s) | |
=== RUN Test304Responses_h2 | |
--- PASS: Test304Responses_h2 (0.03s) | |
=== RUN TestH12_ServerEmptyContentLength | |
--- PASS: TestH12_ServerEmptyContentLength (0.05s) | |
=== RUN TestH12_RequestContentLength_Known_NonZero | |
--- PASS: TestH12_RequestContentLength_Known_NonZero (0.07s) | |
=== RUN TestH12_RequestContentLength_Known_Zero | |
--- PASS: TestH12_RequestContentLength_Known_Zero (0.05s) | |
=== RUN TestH12_RequestContentLength_Unknown | |
--- PASS: TestH12_RequestContentLength_Unknown (0.07s) | |
=== RUN TestCancelRequestMidBody_h1 | |
--- PASS: TestCancelRequestMidBody_h1 (0.04s) | |
=== RUN TestCancelRequestMidBody_h2 | |
--- PASS: TestCancelRequestMidBody_h2 (0.03s) | |
=== RUN TestTrailersClientToServer_h1 | |
--- PASS: TestTrailersClientToServer_h1 (0.04s) | |
=== RUN TestTrailersClientToServer_h2 | |
--- PASS: TestTrailersClientToServer_h2 (0.03s) | |
=== RUN TestTrailersServerToClient_h1 | |
--- PASS: TestTrailersServerToClient_h1 (0.03s) | |
=== RUN TestTrailersServerToClient_h2 | |
--- PASS: TestTrailersServerToClient_h2 (0.03s) | |
=== RUN TestTrailersServerToClient_Flush_h1 | |
--- PASS: TestTrailersServerToClient_Flush_h1 (0.03s) | |
=== RUN TestTrailersServerToClient_Flush_h2 | |
--- PASS: TestTrailersServerToClient_Flush_h2 (0.05s) | |
=== RUN TestResponseBodyReadAfterClose_h1 | |
--- PASS: TestResponseBodyReadAfterClose_h1 (0.02s) | |
=== RUN TestResponseBodyReadAfterClose_h2 | |
--- PASS: TestResponseBodyReadAfterClose_h2 (0.06s) | |
=== RUN TestConcurrentReadWriteReqBody_h1 | |
--- PASS: TestConcurrentReadWriteReqBody_h1 (0.03s) | |
=== RUN TestConcurrentReadWriteReqBody_h2 | |
--- PASS: TestConcurrentReadWriteReqBody_h2 (0.04s) | |
=== RUN TestConnectRequest_h1 | |
--- PASS: TestConnectRequest_h1 (0.04s) | |
=== RUN TestConnectRequest_h2 | |
--- PASS: TestConnectRequest_h2 (0.07s) | |
=== RUN TestTransportUserAgent_h1 | |
--- PASS: TestTransportUserAgent_h1 (0.03s) | |
=== RUN TestTransportUserAgent_h2 | |
--- PASS: TestTransportUserAgent_h2 (0.10s) | |
=== RUN TestStarRequestFoo_h1 | |
--- PASS: TestStarRequestFoo_h1 (0.03s) | |
=== RUN TestStarRequestFoo_h2 | |
--- PASS: TestStarRequestFoo_h2 (0.04s) | |
=== RUN TestStarRequestOptions_h1 | |
--- PASS: TestStarRequestOptions_h1 (0.06s) | |
=== RUN TestStarRequestOptions_h2 | |
--- PASS: TestStarRequestOptions_h2 (0.05s) | |
=== RUN TestTransportDiscardsUnneededConns | |
--- PASS: TestTransportDiscardsUnneededConns (0.10s) | |
=== RUN TestTransportGCRequest_Body_h1 | |
--- PASS: TestTransportGCRequest_Body_h1 (0.15s) | |
=== RUN TestTransportGCRequest_Body_h2 | |
--- PASS: TestTransportGCRequest_Body_h2 (0.16s) | |
=== RUN TestTransportGCRequest_NoBody_h1 | |
--- PASS: TestTransportGCRequest_NoBody_h1 (0.13s) | |
=== RUN TestTransportGCRequest_NoBody_h2 | |
--- PASS: TestTransportGCRequest_NoBody_h2 (0.14s) | |
=== RUN TestTransportRejectsInvalidHeaders_h1 | |
--- PASS: TestTransportRejectsInvalidHeaders_h1 (0.07s) | |
=== RUN TestTransportRejectsInvalidHeaders_h2 | |
--- PASS: TestTransportRejectsInvalidHeaders_h2 (0.12s) | |
=== RUN TestInterruptWithPanic_h1 | |
--- PASS: TestInterruptWithPanic_h1 (0.02s) | |
=== RUN TestInterruptWithPanic_h2 | |
--- PASS: TestInterruptWithPanic_h2 (0.04s) | |
=== RUN TestInterruptWithPanic_nil_h1 | |
--- PASS: TestInterruptWithPanic_nil_h1 (0.04s) | |
=== RUN TestInterruptWithPanic_nil_h2 | |
--- PASS: TestInterruptWithPanic_nil_h2 (0.04s) | |
=== RUN TestInterruptWithPanic_ErrAbortHandler_h1 | |
--- PASS: TestInterruptWithPanic_ErrAbortHandler_h1 (0.04s) | |
=== RUN TestInterruptWithPanic_ErrAbortHandler_h2 | |
--- PASS: TestInterruptWithPanic_ErrAbortHandler_h2 (0.07s) | |
=== RUN TestH12_AutoGzipWithDumpResponse | |
--- PASS: TestH12_AutoGzipWithDumpResponse (0.09s) | |
=== RUN TestCloseIdleConnections_h1 | |
--- PASS: TestCloseIdleConnections_h1 (0.07s) | |
=== RUN TestCloseIdleConnections_h2 | |
--- PASS: TestCloseIdleConnections_h2 (0.10s) | |
=== RUN TestNoSniffExpectRequestBody_h1 | |
--- PASS: TestNoSniffExpectRequestBody_h1 (0.05s) | |
=== RUN TestNoSniffExpectRequestBody_h2 | |
--- PASS: TestNoSniffExpectRequestBody_h2 (0.06s) | |
=== RUN TestServerUndeclaredTrailers_h1 | |
--- PASS: TestServerUndeclaredTrailers_h1 (0.03s) | |
=== RUN TestServerUndeclaredTrailers_h2 | |
--- PASS: TestServerUndeclaredTrailers_h2 (0.06s) | |
=== RUN TestBadResponseAfterReadingBody | |
--- PASS: TestBadResponseAfterReadingBody (0.04s) | |
=== RUN TestWriteHeader0_h1 | |
--- PASS: TestWriteHeader0_h1 (0.05s) | |
=== RUN TestWriteHeader0_h2 | |
--- PASS: TestWriteHeader0_h2 (0.06s) | |
=== RUN TestWriteHeaderNoCodeCheck_h1 | |
--- PASS: TestWriteHeaderNoCodeCheck_h1 (0.02s) | |
=== RUN TestWriteHeaderNoCodeCheck_h1hijack | |
--- PASS: TestWriteHeaderNoCodeCheck_h1hijack (0.04s) | |
=== RUN TestWriteHeaderNoCodeCheck_h2 | |
--- PASS: TestWriteHeaderNoCodeCheck_h2 (0.06s) | |
=== RUN TestBidiStreamReverseProxy | |
--- PASS: TestBidiStreamReverseProxy (0.28s) | |
=== RUN TestH12_WebSocketUpgrade | |
--- PASS: TestH12_WebSocketUpgrade (0.06s) | |
=== RUN TestServeFile | |
--- PASS: TestServeFile (0.09s) | |
=== RUN TestServeFile_DotDot | |
--- PASS: TestServeFile_DotDot (0.00s) | |
=== RUN TestServeFileDirPanicEmptyPath | |
--- PASS: TestServeFileDirPanicEmptyPath (0.00s) | |
=== RUN TestFSRedirect | |
--- PASS: TestFSRedirect (0.09s) | |
=== RUN TestFileServerCleans | |
--- PASS: TestFileServerCleans (0.00s) | |
=== RUN TestFileServerEscapesNames | |
--- PASS: TestFileServerEscapesNames (0.06s) | |
=== RUN TestFileServerSortsNames | |
--- PASS: TestFileServerSortsNames (0.04s) | |
=== RUN TestFileServerImplicitLeadingSlash | |
--- PASS: TestFileServerImplicitLeadingSlash (0.03s) | |
=== RUN TestDirJoin | |
--- PASS: TestDirJoin (0.00s) | |
=== RUN TestEmptyDirOpenCWD | |
--- PASS: TestEmptyDirOpenCWD (0.00s) | |
=== RUN TestServeFileContentType | |
--- PASS: TestServeFileContentType (0.07s) | |
=== RUN TestServeFileMimeType | |
--- PASS: TestServeFileMimeType (0.02s) | |
=== RUN TestServeFileFromCWD | |
--- PASS: TestServeFileFromCWD (0.03s) | |
=== RUN TestServeDirWithoutTrailingSlash | |
--- PASS: TestServeDirWithoutTrailingSlash (0.03s) | |
=== RUN TestServeFileWithContentEncoding_h1 | |
--- PASS: TestServeFileWithContentEncoding_h1 (0.03s) | |
=== RUN TestServeFileWithContentEncoding_h2 | |
--- PASS: TestServeFileWithContentEncoding_h2 (0.05s) | |
=== RUN TestServeIndexHtml | |
--- PASS: TestServeIndexHtml (0.03s) | |
=== RUN TestFileServerZeroByte | |
--- PASS: TestFileServerZeroByte (0.03s) | |
=== RUN TestDirectoryIfNotModified | |
--- PASS: TestDirectoryIfNotModified (0.06s) | |
=== RUN TestServeContent | |
--- PASS: TestServeContent (0.23s) | |
=== RUN TestServerFileStatError | |
--- PASS: TestServerFileStatError (0.00s) | |
=== RUN TestServeContentErrorMessages | |
--- PASS: TestServeContentErrorMessages (0.07s) | |
=== RUN TestLinuxSendfile | |
TestLinuxSendfile: fs_test.go:1109: skipping; linux-only test | |
--- SKIP: TestLinuxSendfile (0.00s) | |
=== RUN TestLinuxSendfileChild | |
--- PASS: TestLinuxSendfileChild (0.00s) | |
=== RUN TestFileServerNotDirError | |
=== RUN TestFileServerNotDirError/RelativePath | |
=== RUN TestFileServerNotDirError/AbsolutePath | |
--- PASS: TestFileServerNotDirError (0.03s) | |
--- PASS: TestFileServerNotDirError/RelativePath (0.00s) | |
--- PASS: TestFileServerNotDirError/AbsolutePath (0.00s) | |
=== RUN TestFileServerCleanPath | |
--- PASS: TestFileServerCleanPath (0.00s) | |
=== RUN Test_scanETag | |
--- PASS: Test_scanETag (0.00s) | |
=== RUN TestQuery | |
--- PASS: TestQuery (0.00s) | |
=== RUN TestParseFormQuery | |
--- PASS: TestParseFormQuery (0.00s) | |
=== RUN TestParseFormQueryMethods | |
--- PASS: TestParseFormQueryMethods (0.00s) | |
=== RUN TestParseFormUnknownContentType | |
=== RUN TestParseFormUnknownContentType/text | |
=== RUN TestParseFormUnknownContentType/empty | |
=== RUN TestParseFormUnknownContentType/boundary | |
=== RUN TestParseFormUnknownContentType/unknown | |
--- PASS: TestParseFormUnknownContentType (0.00s) | |
--- PASS: TestParseFormUnknownContentType/text (0.00s) | |
--- PASS: TestParseFormUnknownContentType/empty (0.00s) | |
--- PASS: TestParseFormUnknownContentType/boundary (0.00s) | |
--- PASS: TestParseFormUnknownContentType/unknown (0.00s) | |
=== RUN TestParseFormInitializeOnError | |
--- PASS: TestParseFormInitializeOnError (0.00s) | |
=== RUN TestMultipartReader | |
--- PASS: TestMultipartReader (0.00s) | |
=== RUN TestParseMultipartFormPopulatesPostForm | |
--- PASS: TestParseMultipartFormPopulatesPostForm (0.00s) | |
=== RUN TestParseMultipartForm | |
--- PASS: TestParseMultipartForm (0.00s) | |
=== RUN TestRedirect_h1 | |
--- PASS: TestRedirect_h1 (0.04s) | |
=== RUN TestRedirect_h2 | |
--- PASS: TestRedirect_h2 (0.06s) | |
=== RUN TestSetBasicAuth | |
--- PASS: TestSetBasicAuth (0.00s) | |
=== RUN TestMultipartRequest | |
--- PASS: TestMultipartRequest (0.00s) | |
=== RUN TestMultipartRequestAuto | |
--- PASS: TestMultipartRequestAuto (0.00s) | |
=== RUN TestMissingFileMultipartRequest | |
--- PASS: TestMissingFileMultipartRequest (0.00s) | |
=== RUN TestFormValueCallsParseMultipartForm | |
--- PASS: TestFormValueCallsParseMultipartForm (0.00s) | |
=== RUN TestFormFileCallsParseMultipartForm | |
--- PASS: TestFormFileCallsParseMultipartForm (0.00s) | |
=== RUN TestParseMultipartFormOrder | |
--- PASS: TestParseMultipartFormOrder (0.00s) | |
=== RUN TestMultipartReaderOrder | |
--- PASS: TestMultipartReaderOrder (0.00s) | |
=== RUN TestFormFileOrder | |
--- PASS: TestFormFileOrder (0.00s) | |
=== RUN TestReadRequestErrors | |
--- PASS: TestReadRequestErrors (0.00s) | |
=== RUN TestNewRequestHost | |
--- PASS: TestNewRequestHost (0.00s) | |
=== RUN TestRequestInvalidMethod | |
--- PASS: TestRequestInvalidMethod (0.00s) | |
=== RUN TestNewRequestContentLength | |
--- PASS: TestNewRequestContentLength (0.00s) | |
=== RUN TestParseHTTPVersion | |
--- PASS: TestParseHTTPVersion (0.00s) | |
=== RUN TestGetBasicAuth | |
--- PASS: TestGetBasicAuth (0.00s) | |
=== RUN TestParseBasicAuth | |
--- PASS: TestParseBasicAuth (0.00s) | |
=== RUN TestRequestWriteBufferedWriter | |
--- PASS: TestRequestWriteBufferedWriter (0.00s) | |
=== RUN TestRequestBadHost | |
--- PASS: TestRequestBadHost (0.00s) | |
=== RUN TestStarRequest | |
--- PASS: TestStarRequest (0.00s) | |
=== RUN TestIssue10884_MaxBytesEOF | |
--- PASS: TestIssue10884_MaxBytesEOF (0.00s) | |
=== RUN TestMaxBytesReaderStickyError | |
TestMaxBytesReaderStickyError: request_test.go:789: Got log: Read(1000) = 99, <nil> | |
Read(1000) = 0, EOF | |
Read(1000) = 0, EOF | |
TestMaxBytesReaderStickyError: request_test.go:789: Got log: Read(1000) = 100, <nil> | |
Read(1000) = 0, EOF | |
Read(1000) = 0, EOF | |
TestMaxBytesReaderStickyError: request_test.go:789: Got log: Read(1000) = 100, http: request body too large | |
Read(1000) = 0, http: request body too large | |
--- PASS: TestMaxBytesReaderStickyError (0.00s) | |
=== RUN TestWithContextDeepCopiesURL | |
--- PASS: TestWithContextDeepCopiesURL (0.00s) | |
=== RUN TestNoPanicOnRoundTripWithBasicAuth_h1 | |
--- PASS: TestNoPanicOnRoundTripWithBasicAuth_h1 (0.03s) | |
=== RUN TestNoPanicOnRoundTripWithBasicAuth_h2 | |
--- PASS: TestNoPanicOnRoundTripWithBasicAuth_h2 (0.04s) | |
=== RUN TestNewRequestGetBody | |
--- PASS: TestNewRequestGetBody (0.00s) | |
=== RUN TestConsumingBodyOnNextConn | |
=== PAUSE TestConsumingBodyOnNextConn | |
=== RUN TestHostHandlers | |
--- PASS: TestHostHandlers (0.04s) | |
=== RUN TestServeMuxHandler | |
--- PASS: TestServeMuxHandler (0.00s) | |
=== RUN TestServeMuxHandleFuncWithNilHandler | |
--- PASS: TestServeMuxHandleFuncWithNilHandler (0.00s) | |
=== RUN TestServeMuxHandlerRedirects | |
--- PASS: TestServeMuxHandlerRedirects (0.00s) | |
=== RUN TestMuxRedirectLeadingSlashes | |
--- PASS: TestMuxRedirectLeadingSlashes (0.00s) | |
=== RUN TestServeWithSlashRedirectKeepsQueryString | |
--- PASS: TestServeWithSlashRedirectKeepsQueryString (0.08s) | |
=== RUN TestServeWithSlashRedirectForHostPatterns | |
--- PASS: TestServeWithSlashRedirectForHostPatterns (0.01s) | |
=== RUN TestShouldRedirectConcurrency | |
--- PASS: TestShouldRedirectConcurrency (0.00s) | |
=== RUN TestServerTimeouts | |
--- PASS: TestServerTimeouts (0.98s) | |
=== RUN TestHTTP2WriteDeadlineExtendedOnNewRequest | |
--- PASS: TestHTTP2WriteDeadlineExtendedOnNewRequest (0.41s) | |
=== RUN TestHTTP2WriteDeadlineEnforcedPerStream | |
--- PASS: TestHTTP2WriteDeadlineEnforcedPerStream (0.17s) | |
=== RUN TestHTTP2NoWriteDeadline | |
--- PASS: TestHTTP2NoWriteDeadline (0.27s) | |
=== RUN TestOnlyWriteTimeout | |
--- PASS: TestOnlyWriteTimeout (0.01s) | |
=== RUN TestIdentityResponse | |
--- PASS: TestIdentityResponse (0.05s) | |
=== RUN TestServeHTTP10Close | |
--- PASS: TestServeHTTP10Close (0.02s) | |
=== RUN TestClientCanClose | |
--- PASS: TestClientCanClose (0.02s) | |
=== RUN TestHandlersCanSetConnectionClose11 | |
--- PASS: TestHandlersCanSetConnectionClose11 (0.03s) | |
=== RUN TestHandlersCanSetConnectionClose10 | |
--- PASS: TestHandlersCanSetConnectionClose10 (0.02s) | |
=== RUN TestHTTP2UpgradeClosesConnection | |
--- PASS: TestHTTP2UpgradeClosesConnection (0.03s) | |
=== RUN TestHTTP10KeepAlive204Response | |
--- PASS: TestHTTP10KeepAlive204Response (0.03s) | |
=== RUN TestHTTP11KeepAlive204Response | |
--- PASS: TestHTTP11KeepAlive204Response (0.05s) | |
=== RUN TestHTTP10KeepAlive304Response | |
--- PASS: TestHTTP10KeepAlive304Response (0.02s) | |
=== RUN TestKeepAliveFinalChunkWithEOF | |
--- PASS: TestKeepAliveFinalChunkWithEOF (0.05s) | |
=== RUN TestSetsRemoteAddr_h1 | |
--- PASS: TestSetsRemoteAddr_h1 (0.03s) | |
=== RUN TestSetsRemoteAddr_h2 | |
--- PASS: TestSetsRemoteAddr_h2 (0.04s) | |
=== RUN TestServerAllowsBlockingRemoteAddr | |
--- PASS: TestServerAllowsBlockingRemoteAddr (0.02s) | |
=== RUN TestIdentityResponseHeaders | |
--- PASS: TestIdentityResponseHeaders (0.03s) | |
=== RUN TestHeadResponses_h1 | |
--- PASS: TestHeadResponses_h1 (0.01s) | |
=== RUN TestHeadResponses_h2 | |
--- PASS: TestHeadResponses_h2 (0.02s) | |
=== RUN TestTLSHandshakeTimeout | |
--- PASS: TestTLSHandshakeTimeout (0.27s) | |
=== RUN TestTLSServer | |
--- PASS: TestTLSServer (0.05s) | |
=== RUN TestServeTLS | |
--- PASS: TestServeTLS (0.02s) | |
=== RUN TestTLSServerRejectHTTPRequests | |
--- PASS: TestTLSServerRejectHTTPRequests (0.02s) | |
=== RUN TestAutomaticHTTP2_Serve_NoTLSConfig | |
--- PASS: TestAutomaticHTTP2_Serve_NoTLSConfig (0.00s) | |
=== RUN TestAutomaticHTTP2_Serve_NonH2TLSConfig | |
--- PASS: TestAutomaticHTTP2_Serve_NonH2TLSConfig (2.31s) | |
=== RUN TestAutomaticHTTP2_Serve_H2TLSConfig | |
--- PASS: TestAutomaticHTTP2_Serve_H2TLSConfig (0.01s) | |
=== RUN TestAutomaticHTTP2_Serve_WithTLSConfig | |
--- PASS: TestAutomaticHTTP2_Serve_WithTLSConfig (0.01s) | |
=== RUN TestAutomaticHTTP2_ListenAndServe | |
TestAutomaticHTTP2_ListenAndServe: serve_test.go:1673: Got 127.0.0.1:54080 | |
TestAutomaticHTTP2_ListenAndServe: serve_test.go:1690: Listening on 127.0.0.1:54080 | |
--- PASS: TestAutomaticHTTP2_ListenAndServe (0.03s) | |
=== RUN TestAutomaticHTTP2_ListenAndServe_GetCertificate | |
TestAutomaticHTTP2_ListenAndServe_GetCertificate: serve_test.go:1673: Got 127.0.0.1:54092 | |
TestAutomaticHTTP2_ListenAndServe_GetCertificate: serve_test.go:1690: Listening on 127.0.0.1:54092 | |
--- PASS: TestAutomaticHTTP2_ListenAndServe_GetCertificate (0.04s) | |
=== RUN TestServerExpect | |
--- PASS: TestServerExpect (0.17s) | |
=== RUN TestServerUnreadRequestBodyLittle | |
--- PASS: TestServerUnreadRequestBodyLittle (0.00s) | |
=== RUN TestServerUnreadRequestBodyLarge | |
--- PASS: TestServerUnreadRequestBodyLarge (0.50s) | |
=== RUN TestHandlerBodyClose | |
--- PASS: TestHandlerBodyClose (1.51s) | |
=== RUN TestRequestBodyReadErrorClosesConnection | |
--- PASS: TestRequestBodyReadErrorClosesConnection (0.00s) | |
=== RUN TestInvalidTrailerClosesConnection | |
--- PASS: TestInvalidTrailerClosesConnection (0.00s) | |
=== RUN TestRequestBodyTimeoutClosesConnection | |
--- PASS: TestRequestBodyTimeoutClosesConnection (1.20s) | |
=== RUN TestTimeoutHandler_h1 | |
--- PASS: TestTimeoutHandler_h1 (0.05s) | |
=== RUN TestTimeoutHandler_h2 | |
--- PASS: TestTimeoutHandler_h2 (0.06s) | |
=== RUN TestTimeoutHandlerRace | |
--- PASS: TestTimeoutHandlerRace (0.46s) | |
=== RUN TestTimeoutHandlerRaceHeader | |
--- PASS: TestTimeoutHandlerRaceHeader (1.12s) | |
=== RUN TestTimeoutHandlerRaceHeaderTimeout | |
--- PASS: TestTimeoutHandlerRaceHeaderTimeout (0.02s) | |
=== RUN TestTimeoutHandlerStartTimerWhenServing | |
--- PASS: TestTimeoutHandlerStartTimerWhenServing (7.39s) | |
=== RUN TestTimeoutHandlerEmptyResponse | |
--- PASS: TestTimeoutHandlerEmptyResponse (0.01s) | |
=== RUN TestTimeoutHandlerPanicRecovery | |
--- PASS: TestTimeoutHandlerPanicRecovery (0.02s) | |
=== RUN TestRedirectBadPath | |
--- PASS: TestRedirectBadPath (0.00s) | |
=== RUN TestRedirect | |
--- PASS: TestRedirect (0.00s) | |
=== RUN TestRedirectContentTypeAndBody | |
--- PASS: TestRedirectContentTypeAndBody (0.00s) | |
=== RUN TestZeroLengthPostAndResponse_h1 | |
--- PASS: TestZeroLengthPostAndResponse_h1 (0.04s) | |
=== RUN TestZeroLengthPostAndResponse_h2 | |
--- PASS: TestZeroLengthPostAndResponse_h2 (0.04s) | |
=== RUN TestHandlerPanicNil_h1 | |
--- PASS: TestHandlerPanicNil_h1 (0.03s) | |
=== RUN TestHandlerPanicNil_h2 | |
--- PASS: TestHandlerPanicNil_h2 (0.02s) | |
=== RUN TestHandlerPanic_h1 | |
--- PASS: TestHandlerPanic_h1 (0.02s) | |
=== RUN TestHandlerPanic_h2 | |
--- PASS: TestHandlerPanic_h2 (0.04s) | |
=== RUN TestHandlerPanicWithHijack | |
--- PASS: TestHandlerPanicWithHijack (0.02s) | |
=== RUN TestServerWriteHijackZeroBytes | |
--- PASS: TestServerWriteHijackZeroBytes (0.03s) | |
=== RUN TestServerNoDate_h1 | |
--- PASS: TestServerNoDate_h1 (0.02s) | |
=== RUN TestServerNoDate_h2 | |
--- PASS: TestServerNoDate_h2 (0.03s) | |
=== RUN TestServerNoContentType_h1 | |
--- PASS: TestServerNoContentType_h1 (0.02s) | |
=== RUN TestServerNoContentType_h2 | |
--- PASS: TestServerNoContentType_h2 (0.03s) | |
=== RUN TestStripPrefix | |
--- PASS: TestStripPrefix (0.03s) | |
=== RUN TestStripPrefixNotModifyRequest | |
--- PASS: TestStripPrefixNotModifyRequest (0.00s) | |
=== RUN TestRequestLimit_h1 | |
--- PASS: TestRequestLimit_h1 (0.70s) | |
=== RUN TestRequestLimit_h2 | |
--- PASS: TestRequestLimit_h2 (0.76s) | |
=== RUN TestRequestBodyLimit_h1 | |
--- PASS: TestRequestBodyLimit_h1 (0.53s) | |
=== RUN TestRequestBodyLimit_h2 | |
--- PASS: TestRequestBodyLimit_h2 (0.05s) | |
=== RUN TestClientWriteShutdown | |
--- PASS: TestClientWriteShutdown (0.02s) | |
=== RUN TestServerBufferedChunking | |
--- PASS: TestServerBufferedChunking (0.00s) | |
=== RUN TestServerGracefulClose | |
--- PASS: TestServerGracefulClose (0.57s) | |
=== RUN TestCaseSensitiveMethod_h1 | |
--- PASS: TestCaseSensitiveMethod_h1 (0.01s) | |
=== RUN TestCaseSensitiveMethod_h2 | |
--- PASS: TestCaseSensitiveMethod_h2 (0.02s) | |
=== RUN TestContentLengthZero | |
--- PASS: TestContentLengthZero (0.03s) | |
=== RUN TestCloseNotifier | |
--- PASS: TestCloseNotifier (0.01s) | |
=== RUN TestCloseNotifierPipelined | |
--- PASS: TestCloseNotifierPipelined (0.22s) | |
=== RUN TestCloseNotifierChanLeak | |
--- PASS: TestCloseNotifierChanLeak (0.00s) | |
=== RUN TestHijackAfterCloseNotifier | |
--- PASS: TestHijackAfterCloseNotifier (0.01s) | |
=== RUN TestHijackBeforeRequestBodyRead | |
--- PASS: TestHijackBeforeRequestBodyRead (0.03s) | |
=== RUN TestOptions | |
--- PASS: TestOptions (0.02s) | |
=== RUN TestHeaderToWire | |
--- PASS: TestHeaderToWire (0.00s) | |
=== RUN TestAcceptMaxFds | |
--- PASS: TestAcceptMaxFds (0.01s) | |
=== RUN TestWriteAfterHijack | |
--- PASS: TestWriteAfterHijack (0.00s) | |
=== RUN TestDoubleHijack | |
--- PASS: TestDoubleHijack (0.00s) | |
=== RUN TestHTTP10ConnectionHeader | |
--- PASS: TestHTTP10ConnectionHeader (0.04s) | |
=== RUN TestServerReaderFromOrder_h1 | |
--- PASS: TestServerReaderFromOrder_h1 (0.07s) | |
=== RUN TestServerReaderFromOrder_h2 | |
--- PASS: TestServerReaderFromOrder_h2 (0.13s) | |
=== RUN TestCodesPreventingContentTypeAndBody | |
--- PASS: TestCodesPreventingContentTypeAndBody (0.00s) | |
=== RUN TestContentTypeOkayOn204 | |
--- PASS: TestContentTypeOkayOn204 (0.00s) | |
=== RUN TestTransportAndServerSharedBodyRace_h1 | |
--- PASS: TestTransportAndServerSharedBodyRace_h1 (0.55s) | |
=== RUN TestTransportAndServerSharedBodyRace_h2 | |
--- PASS: TestTransportAndServerSharedBodyRace_h2 (0.74s) | |
=== RUN TestRequestBodyCloseDoesntBlock | |
--- PASS: TestRequestBodyCloseDoesntBlock (0.52s) | |
=== RUN TestResponseWriterWriteString | |
--- PASS: TestResponseWriterWriteString (0.00s) | |
=== RUN TestAppendTime | |
--- PASS: TestAppendTime (0.00s) | |
=== RUN TestServerConnState | |
--- PASS: TestServerConnState (0.12s) | |
=== RUN TestServerKeepAlivesEnabled | |
--- PASS: TestServerKeepAlivesEnabled (0.03s) | |
=== RUN TestServerEmptyBodyRace_h1 | |
--- PASS: TestServerEmptyBodyRace_h1 (0.08s) | |
=== RUN TestServerEmptyBodyRace_h2 | |
--- PASS: TestServerEmptyBodyRace_h2 (0.08s) | |
=== RUN TestServerConnStateNew | |
--- PASS: TestServerConnStateNew (0.00s) | |
=== RUN TestCloseWrite | |
--- PASS: TestCloseWrite (0.50s) | |
=== RUN TestServerFlushAndHijack | |
--- PASS: TestServerFlushAndHijack (0.23s) | |
=== RUN TestServerKeepAliveAfterWriteError | |
--- PASS: TestServerKeepAliveAfterWriteError (1.89s) | |
=== RUN TestNoContentLengthIfTransferEncoding | |
--- PASS: TestNoContentLengthIfTransferEncoding (0.02s) | |
=== RUN TestTolerateCRLFBeforeRequestLine | |
--- PASS: TestTolerateCRLFBeforeRequestLine (0.00s) | |
=== RUN TestIssue13893_Expect100 | |
--- PASS: TestIssue13893_Expect100 (0.00s) | |
=== RUN TestIssue11549_Expect100 | |
--- PASS: TestIssue11549_Expect100 (0.00s) | |
=== RUN TestHandlerFinishSkipBigContentLengthRead | |
--- PASS: TestHandlerFinishSkipBigContentLengthRead (0.50s) | |
=== RUN TestHandlerSetsBodyNil_h1 | |
--- PASS: TestHandlerSetsBodyNil_h1 (0.36s) | |
=== RUN TestHandlerSetsBodyNil_h2 | |
--- PASS: TestHandlerSetsBodyNil_h2 (0.03s) | |
=== RUN TestServerValidatesHostHeader | |
--- PASS: TestServerValidatesHostHeader (0.00s) | |
=== RUN TestServerHandlersCanHandleH2PRI | |
--- PASS: TestServerHandlersCanHandleH2PRI (0.02s) | |
=== RUN TestServerValidatesHeaders | |
--- PASS: TestServerValidatesHeaders (0.51s) | |
=== RUN TestServerRequestContextCancel_ServeHTTPDone_h1 | |
--- PASS: TestServerRequestContextCancel_ServeHTTPDone_h1 (0.02s) | |
=== RUN TestServerRequestContextCancel_ServeHTTPDone_h2 | |
--- PASS: TestServerRequestContextCancel_ServeHTTPDone_h2 (0.02s) | |
=== RUN TestServerRequestContextCancel_ConnClose | |
--- PASS: TestServerRequestContextCancel_ConnClose (0.02s) | |
=== RUN TestServerContext_ServerContextKey_h1 | |
--- PASS: TestServerContext_ServerContextKey_h1 (0.02s) | |
=== RUN TestServerContext_ServerContextKey_h2 | |
--- PASS: TestServerContext_ServerContextKey_h2 (0.03s) | |
=== RUN TestServerContext_LocalAddrContextKey_h1 | |
--- PASS: TestServerContext_LocalAddrContextKey_h1 (0.02s) | |
=== RUN TestServerContext_LocalAddrContextKey_h2 | |
--- PASS: TestServerContext_LocalAddrContextKey_h2 (0.03s) | |
=== RUN TestHandlerSetTransferEncodingChunked | |
--- PASS: TestHandlerSetTransferEncodingChunked (0.00s) | |
=== RUN TestHandlerSetTransferEncodingGzip | |
--- PASS: TestHandlerSetTransferEncodingGzip (0.00s) | |
=== RUN TestConcurrentServerServe | |
--- PASS: TestConcurrentServerServe (0.00s) | |
=== RUN TestServerIdleTimeout | |
--- PASS: TestServerIdleTimeout (5.14s) | |
=== RUN TestServerSetKeepAlivesEnabledClosesConns | |
--- PASS: TestServerSetKeepAlivesEnabledClosesConns (0.04s) | |
=== RUN TestServerShutdown_h1 | |
--- PASS: TestServerShutdown_h1 (0.06s) | |
=== RUN TestServerShutdown_h2 | |
--- PASS: TestServerShutdown_h2 (1.06s) | |
=== RUN TestServerShutdownStateNew | |
--- PASS: TestServerShutdownStateNew (5.71s) | |
=== RUN TestServerCloseDeadlock | |
--- PASS: TestServerCloseDeadlock (0.00s) | |
=== RUN TestServerKeepAlivesEnabled_h1 | |
--- PASS: TestServerKeepAlivesEnabled_h1 (0.04s) | |
=== RUN TestServerKeepAlivesEnabled_h2 | |
--- PASS: TestServerKeepAlivesEnabled_h2 (0.12s) | |
=== RUN TestServerCancelsReadTimeoutWhenIdle | |
--- PASS: TestServerCancelsReadTimeoutWhenIdle (0.04s) | |
=== RUN TestServerDuplicateBackgroundRead | |
--- PASS: TestServerDuplicateBackgroundRead (0.11s) | |
=== RUN TestServerHijackGetsBackgroundByte | |
--- PASS: TestServerHijackGetsBackgroundByte (0.03s) | |
=== RUN TestServerHijackGetsBackgroundByte_big | |
--- PASS: TestServerHijackGetsBackgroundByte_big (0.02s) | |
=== RUN TestServerValidatesMethod | |
--- PASS: TestServerValidatesMethod (0.00s) | |
=== RUN TestServerListenNotComparableListener | |
--- PASS: TestServerListenNotComparableListener (0.00s) | |
=== RUN TestServerCloseListenerOnce | |
--- PASS: TestServerCloseListenerOnce (0.01s) | |
=== RUN TestServerShutdownThenServe | |
--- PASS: TestServerShutdownThenServe (0.00s) | |
=== RUN TestStripPortFromHost | |
--- PASS: TestStripPortFromHost (0.00s) | |
=== RUN TestServerContexts | |
--- PASS: TestServerContexts (0.03s) | |
=== RUN TestServerContextsHTTP2 | |
--- PASS: TestServerContextsHTTP2 (0.03s) | |
=== RUN TestConnContextNotModifyingAllContexts | |
--- PASS: TestConnContextNotModifyingAllContexts (0.38s) | |
=== RUN TestUnsupportedTransferEncodingsReturn501 | |
--- PASS: TestUnsupportedTransferEncodingsReturn501 (0.06s) | |
=== RUN TestContentEncodingNoSniffing_h1 | |
=== RUN TestContentEncodingNoSniffing_h1/gzip_content-encoding,_gzipped | |
=== RUN TestContentEncodingNoSniffing_h1/zlib_content-encoding,_zlibbed | |
=== RUN TestContentEncodingNoSniffing_h1/no_content-encoding | |
=== RUN TestContentEncodingNoSniffing_h1/phony_content-encoding | |
=== RUN TestContentEncodingNoSniffing_h1/empty_but_set_content-encoding | |
--- PASS: TestContentEncodingNoSniffing_h1 (0.11s) | |
--- PASS: TestContentEncodingNoSniffing_h1/gzip_content-encoding,_gzipped (0.02s) | |
--- PASS: TestContentEncodingNoSniffing_h1/zlib_content-encoding,_zlibbed (0.03s) | |
--- PASS: TestContentEncodingNoSniffing_h1/no_content-encoding (0.02s) | |
--- PASS: TestContentEncodingNoSniffing_h1/phony_content-encoding (0.02s) | |
--- PASS: TestContentEncodingNoSniffing_h1/empty_but_set_content-encoding (0.02s) | |
=== RUN TestContentEncodingNoSniffing_h2 | |
=== RUN TestContentEncodingNoSniffing_h2/gzip_content-encoding,_gzipped | |
=== RUN TestContentEncodingNoSniffing_h2/zlib_content-encoding,_zlibbed | |
=== RUN TestContentEncodingNoSniffing_h2/no_content-encoding | |
=== RUN TestContentEncodingNoSniffing_h2/phony_content-encoding | |
=== RUN TestContentEncodingNoSniffing_h2/empty_but_set_content-encoding | |
--- PASS: TestContentEncodingNoSniffing_h2 (0.18s) | |
--- PASS: TestContentEncodingNoSniffing_h2/gzip_content-encoding,_gzipped (0.04s) | |
--- PASS: TestContentEncodingNoSniffing_h2/zlib_content-encoding,_zlibbed (0.04s) | |
--- PASS: TestContentEncodingNoSniffing_h2/no_content-encoding (0.02s) | |
--- PASS: TestContentEncodingNoSniffing_h2/phony_content-encoding (0.04s) | |
--- PASS: TestContentEncodingNoSniffing_h2/empty_but_set_content-encoding (0.03s) | |
=== RUN TestTimeoutHandlerSuperfluousLogs | |
=== RUN TestTimeoutHandlerSuperfluousLogs/return_before_timeout | |
=== RUN TestTimeoutHandlerSuperfluousLogs/return_after_timeout | |
--- PASS: TestTimeoutHandlerSuperfluousLogs (0.07s) | |
--- PASS: TestTimeoutHandlerSuperfluousLogs/return_before_timeout (0.03s) | |
--- PASS: TestTimeoutHandlerSuperfluousLogs/return_after_timeout (0.04s) | |
=== RUN TestDetectContentType | |
--- PASS: TestDetectContentType (0.00s) | |
=== RUN TestServerContentType_h1 | |
--- PASS: TestServerContentType_h1 (0.09s) | |
=== RUN TestServerContentType_h2 | |
--- PASS: TestServerContentType_h2 (0.13s) | |
=== RUN TestServerIssue5953_h1 | |
--- PASS: TestServerIssue5953_h1 (0.01s) | |
=== RUN TestServerIssue5953_h2 | |
--- PASS: TestServerIssue5953_h2 (0.02s) | |
=== RUN TestContentTypeWithCopy_h1 | |
--- PASS: TestContentTypeWithCopy_h1 (0.02s) | |
=== RUN TestContentTypeWithCopy_h2 | |
--- PASS: TestContentTypeWithCopy_h2 (0.02s) | |
=== RUN TestSniffWriteSize_h1 | |
--- PASS: TestSniffWriteSize_h1 (0.06s) | |
=== RUN TestSniffWriteSize_h2 | |
--- PASS: TestSniffWriteSize_h2 (0.18s) | |
=== RUN TestReuseRequest | |
--- PASS: TestReuseRequest (0.05s) | |
=== RUN TestTransportKeepAlives | |
--- PASS: TestTransportKeepAlives (0.06s) | |
=== RUN TestTransportConnectionCloseOnResponse | |
--- PASS: TestTransportConnectionCloseOnResponse (0.06s) | |
=== RUN TestTransportConnectionCloseOnRequest | |
--- PASS: TestTransportConnectionCloseOnRequest (0.06s) | |
=== RUN TestTransportConnectionCloseOnRequestDisableKeepAlive | |
--- PASS: TestTransportConnectionCloseOnRequestDisableKeepAlive (0.02s) | |
=== RUN TestTransportRespectRequestWantsClose | |
=== RUN TestTransportRespectRequestWantsClose/DisableKeepAlive=false,RequestClose=false | |
=== RUN TestTransportRespectRequestWantsClose/DisableKeepAlive=false,RequestClose=true | |
=== RUN TestTransportRespectRequestWantsClose/DisableKeepAlive=true,RequestClose=false | |
=== RUN TestTransportRespectRequestWantsClose/DisableKeepAlive=true,RequestClose=true | |
--- PASS: TestTransportRespectRequestWantsClose (0.09s) | |
--- PASS: TestTransportRespectRequestWantsClose/DisableKeepAlive=false,RequestClose=false (0.03s) | |
--- PASS: TestTransportRespectRequestWantsClose/DisableKeepAlive=false,RequestClose=true (0.03s) | |
--- PASS: TestTransportRespectRequestWantsClose/DisableKeepAlive=true,RequestClose=false (0.03s) | |
--- PASS: TestTransportRespectRequestWantsClose/DisableKeepAlive=true,RequestClose=true (0.01s) | |
=== RUN TestTransportIdleCacheKeys | |
--- PASS: TestTransportIdleCacheKeys (0.02s) | |
=== RUN TestTransportReadToEndReusesConn | |
--- PASS: TestTransportReadToEndReusesConn (0.04s) | |
=== RUN TestTransportMaxPerHostIdleConns | |
--- PASS: TestTransportMaxPerHostIdleConns (0.05s) | |
=== RUN TestTransportMaxConnsPerHostIncludeDialInProgress | |
--- PASS: TestTransportMaxConnsPerHostIncludeDialInProgress (0.05s) | |
=== RUN TestTransportMaxConnsPerHost | |
--- PASS: TestTransportMaxConnsPerHost (0.42s) | |
=== RUN TestTransportRemovesDeadIdleConnections | |
--- PASS: TestTransportRemovesDeadIdleConnections (0.09s) | |
=== RUN TestTransportServerClosingUnexpectedly | |
--- PASS: TestTransportServerClosingUnexpectedly (0.39s) | |
=== RUN TestStressSurpriseServerCloses | |
--- PASS: TestStressSurpriseServerCloses (1.90s) | |
=== RUN TestTransportHeadResponses | |
--- PASS: TestTransportHeadResponses (0.02s) | |
=== RUN TestTransportHeadChunkedResponse | |
--- PASS: TestTransportHeadChunkedResponse (0.03s) | |
=== RUN TestRoundTripGzip | |
--- PASS: TestRoundTripGzip (0.05s) | |
=== RUN TestTransportGzip | |
--- PASS: TestTransportGzip (0.10s) | |
=== RUN TestTransportExpect100Continue | |
--- PASS: TestTransportExpect100Continue (2.12s) | |
=== RUN TestSOCKS5Proxy | |
=== RUN TestSOCKS5Proxy/useTLS=false | |
=== RUN TestSOCKS5Proxy/useTLS=true | |
--- PASS: TestSOCKS5Proxy (0.15s) | |
--- PASS: TestSOCKS5Proxy/useTLS=false (0.06s) | |
--- PASS: TestSOCKS5Proxy/useTLS=true (0.08s) | |
=== RUN TestTransportProxy | |
=== RUN TestTransportProxy/httpsSite=false,_httpsProxy=false | |
=== RUN TestTransportProxy/httpsSite=false,_httpsProxy=true | |
=== RUN TestTransportProxy/httpsSite=true,_httpsProxy=false | |
=== RUN TestTransportProxy/httpsSite=true,_httpsProxy=true | |
--- PASS: TestTransportProxy (0.21s) | |
--- PASS: TestTransportProxy/httpsSite=false,_httpsProxy=false (0.01s) | |
--- PASS: TestTransportProxy/httpsSite=false,_httpsProxy=true (0.04s) | |
--- PASS: TestTransportProxy/httpsSite=true,_httpsProxy=false (0.08s) | |
--- PASS: TestTransportProxy/httpsSite=true,_httpsProxy=true (0.08s) | |
=== RUN TestTransportProxyHTTPSConnectLeak | |
--- PASS: TestTransportProxyHTTPSConnectLeak (0.01s) | |
=== RUN TestTransportDialPreservesNetOpProxyError | |
--- PASS: TestTransportDialPreservesNetOpProxyError (0.00s) | |
=== RUN TestTransportProxyDialDoesNotMutateProxyConnectHeader | |
--- PASS: TestTransportProxyDialDoesNotMutateProxyConnectHeader (0.04s) | |
=== RUN TestTransportGzipRecursive | |
--- PASS: TestTransportGzipRecursive (0.03s) | |
=== RUN TestTransportGzipShort | |
--- PASS: TestTransportGzipShort (0.02s) | |
=== RUN TestTransportPersistConnLeak | |
--- PASS: TestTransportPersistConnLeak (0.16s) | |
=== RUN TestTransportPersistConnLeakShortBody | |
TestTransportPersistConnLeakShortBody: transport_test.go:1760: goroutine growth: 9 -> 10 -> 10 (delta: 1) | |
--- PASS: TestTransportPersistConnLeakShortBody (0.32s) | |
=== RUN TestTransportPersistConnLeakNeverIdle | |
--- PASS: TestTransportPersistConnLeakNeverIdle (0.05s) | |
=== RUN TestTransportPersistConnContextLeakMaxConnsPerHost | |
--- PASS: TestTransportPersistConnContextLeakMaxConnsPerHost (0.29s) | |
=== RUN TestTransportIdleConnCrash | |
--- PASS: TestTransportIdleConnCrash (0.03s) | |
=== RUN TestIssue3644 | |
--- PASS: TestIssue3644 (0.04s) | |
=== RUN TestIssue3595 | |
--- PASS: TestIssue3595 (0.55s) | |
=== RUN TestChunkedNoContent | |
--- PASS: TestChunkedNoContent (0.03s) | |
=== RUN TestTransportConcurrency | |
--- PASS: TestTransportConcurrency (1.01s) | |
=== RUN TestIssue4191_InfiniteGetTimeout | |
--- PASS: TestIssue4191_InfiniteGetTimeout (0.60s) | |
=== RUN TestIssue4191_InfiniteGetToPutTimeout | |
--- PASS: TestIssue4191_InfiniteGetToPutTimeout (0.78s) | |
=== RUN TestTransportResponseHeaderTimeout | |
--- PASS: TestTransportResponseHeaderTimeout (2.03s) | |
=== RUN TestTransportCancelRequest | |
--- PASS: TestTransportCancelRequest (1.06s) | |
=== RUN TestTransportCancelRequestInDial | |
--- PASS: TestTransportCancelRequestInDial (0.00s) | |
=== RUN TestCancelRequestWithChannel | |
--- PASS: TestCancelRequestWithChannel (4.77s) | |
=== RUN TestCancelRequestWithChannelBeforeDo_Cancel | |
--- PASS: TestCancelRequestWithChannelBeforeDo_Cancel (2.06s) | |
=== RUN TestCancelRequestWithChannelBeforeDo_Context | |
--- PASS: TestCancelRequestWithChannelBeforeDo_Context (0.26s) | |
=== RUN TestTransportCancelBeforeResponseHeaders | |
--- PASS: TestTransportCancelBeforeResponseHeaders (0.00s) | |
=== RUN TestTransportCloseResponseBody | |
--- PASS: TestTransportCloseResponseBody (0.04s) | |
=== RUN TestTransportAltProto | |
--- PASS: TestTransportAltProto (0.00s) | |
=== RUN TestTransportNoHost | |
--- PASS: TestTransportNoHost (0.00s) | |
=== RUN TestTransportEmptyMethod | |
--- PASS: TestTransportEmptyMethod (0.00s) | |
=== RUN TestTransportSocketLateBinding | |
--- PASS: TestTransportSocketLateBinding (0.24s) | |
=== RUN TestTransportReading100Continue | |
--- PASS: TestTransportReading100Continue (0.00s) | |
=== RUN TestTransportIgnore1xxResponses | |
--- PASS: TestTransportIgnore1xxResponses (0.03s) | |
=== RUN TestTransportLimits1xxResponses | |
--- PASS: TestTransportLimits1xxResponses (0.02s) | |
=== RUN TestTransportTreat101Terminal | |
--- PASS: TestTransportTreat101Terminal (0.03s) | |
=== RUN TestProxyFromEnvironment | |
--- PASS: TestProxyFromEnvironment (0.00s) | |
=== RUN TestProxyFromEnvironmentLowerCase | |
--- PASS: TestProxyFromEnvironmentLowerCase (0.00s) | |
=== RUN TestIdleConnChannelLeak | |
--- PASS: TestIdleConnChannelLeak (0.18s) | |
=== RUN TestTransportClosesRequestBody | |
--- PASS: TestTransportClosesRequestBody (0.03s) | |
=== RUN TestTransportTLSHandshakeTimeout | |
--- PASS: TestTransportTLSHandshakeTimeout (0.29s) | |
=== RUN TestTLSServerClosesConnection | |
TestTLSServerClosesConnection: transport_test.go:3219: successes = 20 of 20 | |
--- PASS: TestTLSServerClosesConnection (3.95s) | |
=== RUN TestTransportNoReuseAfterEarlyResponse | |
--- PASS: TestTransportNoReuseAfterEarlyResponse (0.10s) | |
=== RUN TestTransportIssue10457 | |
--- PASS: TestTransportIssue10457 (0.03s) | |
=== RUN TestRetryRequestsOnError | |
=== RUN TestRetryRequestsOnError/IdempotentNoBodySomeWritten | |
=== RUN TestRetryRequestsOnError/IdempotentGetBodySomeWritten | |
=== RUN TestRetryRequestsOnError/NothingWrittenNoBody | |
=== RUN TestRetryRequestsOnError/NothingWrittenGetBody | |
--- PASS: TestRetryRequestsOnError (0.16s) | |
--- PASS: TestRetryRequestsOnError/IdempotentNoBodySomeWritten (0.04s) | |
--- PASS: TestRetryRequestsOnError/IdempotentGetBodySomeWritten (0.04s) | |
--- PASS: TestRetryRequestsOnError/NothingWrittenNoBody (0.04s) | |
--- PASS: TestRetryRequestsOnError/NothingWrittenGetBody (0.04s) | |
=== RUN TestTransportClosesBodyOnError | |
--- PASS: TestTransportClosesBodyOnError (0.05s) | |
=== RUN TestTransportDialTLS | |
--- PASS: TestTransportDialTLS (0.03s) | |
=== RUN TestTransportDialContext | |
--- PASS: TestTransportDialContext (0.03s) | |
=== RUN TestTransportDialTLSContext | |
--- PASS: TestTransportDialTLSContext (0.04s) | |
=== RUN TestRoundTripReturnsProxyError | |
--- PASS: TestRoundTripReturnsProxyError (0.00s) | |
=== RUN TestTransportCloseIdleConnsThenReturn | |
--- PASS: TestTransportCloseIdleConnsThenReturn (0.00s) | |
=== RUN TestTransportTraceGotConnH2IdleConns | |
--- PASS: TestTransportTraceGotConnH2IdleConns (0.00s) | |
=== RUN TestTransportRemovesH2ConnsAfterIdle | |
--- PASS: TestTransportRemovesH2ConnsAfterIdle (0.16s) | |
=== RUN TestTransportRangeAndGzip | |
--- PASS: TestTransportRangeAndGzip (0.02s) | |
=== RUN TestTransportResponseCancelRace | |
--- PASS: TestTransportResponseCancelRace (0.03s) | |
=== RUN TestTransportContentEncodingCaseInsensitive | |
=== RUN TestTransportContentEncodingCaseInsensitive/gzip | |
=== RUN TestTransportContentEncodingCaseInsensitive/GZIP | |
--- PASS: TestTransportContentEncodingCaseInsensitive (0.06s) | |
--- PASS: TestTransportContentEncodingCaseInsensitive/gzip (0.03s) | |
--- PASS: TestTransportContentEncodingCaseInsensitive/GZIP (0.03s) | |
=== RUN TestTransportDialCancelRace | |
--- PASS: TestTransportDialCancelRace (0.02s) | |
=== RUN TestTransportFlushesBodyChunks | |
--- PASS: TestTransportFlushesBodyChunks (0.00s) | |
=== RUN TestTransportFlushesRequestHeader | |
--- PASS: TestTransportFlushesRequestHeader (1.56s) | |
=== RUN TestTransportPrefersResponseOverWriteError | |
--- PASS: TestTransportPrefersResponseOverWriteError (2.45s) | |
=== RUN TestTransportAutomaticHTTP2 | |
--- PASS: TestTransportAutomaticHTTP2 (0.00s) | |
=== RUN TestTransportAutomaticHTTP2_DialerAndTLSConfigSupportsHTTP2AndTLSConfig | |
--- PASS: TestTransportAutomaticHTTP2_DialerAndTLSConfigSupportsHTTP2AndTLSConfig (0.00s) | |
=== RUN TestTransportAutomaticHTTP2_DefaultTransport | |
--- PASS: TestTransportAutomaticHTTP2_DefaultTransport (0.00s) | |
=== RUN TestTransportAutomaticHTTP2_TLSNextProto | |
--- PASS: TestTransportAutomaticHTTP2_TLSNextProto (0.00s) | |
=== RUN TestTransportAutomaticHTTP2_TLSConfig | |
--- PASS: TestTransportAutomaticHTTP2_TLSConfig (0.00s) | |
=== RUN TestTransportAutomaticHTTP2_ExpectContinueTimeout | |
--- PASS: TestTransportAutomaticHTTP2_ExpectContinueTimeout (0.00s) | |
=== RUN TestTransportAutomaticHTTP2_Dial | |
--- PASS: TestTransportAutomaticHTTP2_Dial (0.00s) | |
=== RUN TestTransportAutomaticHTTP2_DialContext | |
--- PASS: TestTransportAutomaticHTTP2_DialContext (0.00s) | |
=== RUN TestTransportAutomaticHTTP2_DialTLS | |
--- PASS: TestTransportAutomaticHTTP2_DialTLS (0.00s) | |
=== RUN TestTransportReuseConnEmptyResponseBody | |
--- PASS: TestTransportReuseConnEmptyResponseBody (1.00s) | |
=== RUN TestNoCrashReturningTransportAltConn | |
--- PASS: TestNoCrashReturningTransportAltConn (0.02s) | |
=== RUN TestTransportReuseConnection_Gzip_Chunked | |
--- PASS: TestTransportReuseConnection_Gzip_Chunked (0.01s) | |
=== RUN TestTransportReuseConnection_Gzip_ContentLength | |
--- PASS: TestTransportReuseConnection_Gzip_ContentLength (0.03s) | |
=== RUN TestTransportResponseHeaderLength | |
--- PASS: TestTransportResponseHeaderLength (0.05s) | |
=== RUN TestTransportEventTrace | |
--- PASS: TestTransportEventTrace (0.01s) | |
=== RUN TestTransportEventTrace_h2 | |
--- PASS: TestTransportEventTrace_h2 (0.03s) | |
=== RUN TestTransportEventTrace_NoHooks | |
--- PASS: TestTransportEventTrace_NoHooks (0.01s) | |
=== RUN TestTransportEventTrace_NoHooks_h2 | |
--- PASS: TestTransportEventTrace_NoHooks_h2 (0.04s) | |
=== RUN TestTransportEventTraceTLSVerify | |
--- PASS: TestTransportEventTraceTLSVerify (0.02s) | |
=== RUN TestTransportEventTraceRealDNS | |
--- PASS: TestTransportEventTraceRealDNS (0.09s) | |
=== RUN TestTransportRejectsAlphaPort | |
--- PASS: TestTransportRejectsAlphaPort (0.00s) | |
=== RUN TestTLSHandshakeTrace | |
--- PASS: TestTLSHandshakeTrace (0.03s) | |
=== RUN TestTransportMaxIdleConns | |
--- PASS: TestTransportMaxIdleConns (0.08s) | |
=== RUN TestTransportIdleConnTimeout_h1 | |
--- PASS: TestTransportIdleConnTimeout_h1 (3.76s) | |
=== RUN TestTransportIdleConnTimeout_h2 | |
--- PASS: TestTransportIdleConnTimeout_h2 (3.04s) | |
=== RUN TestIdleConnH2Crash | |
--- PASS: TestIdleConnH2Crash (0.07s) | |
=== RUN TestTransportReturnsPeekError | |
--- PASS: TestTransportReturnsPeekError (0.00s) | |
=== RUN TestTransportIDNA_h1 | |
--- PASS: TestTransportIDNA_h1 (0.02s) | |
=== RUN TestTransportIDNA_h2 | |
--- PASS: TestTransportIDNA_h2 (0.02s) | |
=== RUN TestTransportProxyConnectHeader | |
--- PASS: TestTransportProxyConnectHeader (0.02s) | |
=== RUN TestMissingStatusNoPanic | |
=== PAUSE TestMissingStatusNoPanic | |
=== RUN TestNoBodyOnChunked304Response | |
--- PASS: TestNoBodyOnChunked304Response (0.01s) | |
=== RUN TestTransportCheckContextDoneEarly | |
--- PASS: TestTransportCheckContextDoneEarly (0.00s) | |
=== RUN TestClientTimeoutKillsConn_BeforeHeaders | |
--- PASS: TestClientTimeoutKillsConn_BeforeHeaders (0.06s) | |
=== RUN TestClientTimeoutKillsConn_AfterHeaders | |
--- PASS: TestClientTimeoutKillsConn_AfterHeaders (0.02s) | |
=== RUN TestTransportResponseBodyWritableOnProtocolSwitch | |
--- PASS: TestTransportResponseBodyWritableOnProtocolSwitch (0.03s) | |
=== RUN TestTransportCONNECTBidi | |
--- PASS: TestTransportCONNECTBidi (0.03s) | |
=== RUN TestTransportRequestReplayable | |
=== RUN TestTransportRequestReplayable/GET | |
=== RUN TestTransportRequestReplayable/GET_http.NoBody | |
=== RUN TestTransportRequestReplayable/GET_body | |
=== RUN TestTransportRequestReplayable/POST | |
=== RUN TestTransportRequestReplayable/POST_idempotency-key | |
=== RUN TestTransportRequestReplayable/POST_x-idempotency-key | |
=== RUN TestTransportRequestReplayable/POST_body | |
--- PASS: TestTransportRequestReplayable (0.00s) | |
--- PASS: TestTransportRequestReplayable/GET (0.00s) | |
--- PASS: TestTransportRequestReplayable/GET_http.NoBody (0.00s) | |
--- PASS: TestTransportRequestReplayable/GET_body (0.00s) | |
--- PASS: TestTransportRequestReplayable/POST (0.00s) | |
--- PASS: TestTransportRequestReplayable/POST_idempotency-key (0.00s) | |
--- PASS: TestTransportRequestReplayable/POST_x-idempotency-key (0.00s) | |
--- PASS: TestTransportRequestReplayable/POST_body (0.00s) | |
=== RUN TestTransportRequestWriteRoundTrip | |
=== RUN TestTransportRequestWriteRoundTrip/file,_length | |
=== RUN TestTransportRequestWriteRoundTrip/file,_no_length | |
=== RUN TestTransportRequestWriteRoundTrip/file,_negative_length | |
=== RUN TestTransportRequestWriteRoundTrip/buffer | |
=== RUN TestTransportRequestWriteRoundTrip/buffer,_no_length | |
=== RUN TestTransportRequestWriteRoundTrip/buffer,_length_-1 | |
--- PASS: TestTransportRequestWriteRoundTrip (0.39s) | |
--- PASS: TestTransportRequestWriteRoundTrip/file,_length (0.03s) | |
--- PASS: TestTransportRequestWriteRoundTrip/file,_no_length (0.02s) | |
--- PASS: TestTransportRequestWriteRoundTrip/file,_negative_length (0.29s) | |
--- PASS: TestTransportRequestWriteRoundTrip/buffer (0.02s) | |
--- PASS: TestTransportRequestWriteRoundTrip/buffer,_no_length (0.02s) | |
--- PASS: TestTransportRequestWriteRoundTrip/buffer,_length_-1 (0.02s) | |
=== RUN TestTransportClone | |
--- PASS: TestTransportClone (0.00s) | |
=== RUN TestIs408 | |
--- PASS: TestIs408 (0.00s) | |
=== RUN TestTransportIgnores408 | |
--- PASS: TestTransportIgnores408 (0.02s) | |
=== RUN TestInvalidHeaderResponse | |
--- PASS: TestInvalidHeaderResponse (0.03s) | |
=== RUN TestTransportClosesBodyOnInvalidRequests | |
=== RUN TestTransportClosesBodyOnInvalidRequests/invalid_method | |
=== RUN TestTransportClosesBodyOnInvalidRequests/nil_URL | |
=== RUN TestTransportClosesBodyOnInvalidRequests/invalid_header_key | |
=== RUN TestTransportClosesBodyOnInvalidRequests/invalid_header_value | |
=== RUN TestTransportClosesBodyOnInvalidRequests/non_HTTP(s)_scheme | |
=== RUN TestTransportClosesBodyOnInvalidRequests/no_Host_in_URL | |
--- PASS: TestTransportClosesBodyOnInvalidRequests (0.00s) | |
--- PASS: TestTransportClosesBodyOnInvalidRequests/invalid_method (0.00s) | |
--- PASS: TestTransportClosesBodyOnInvalidRequests/nil_URL (0.00s) | |
--- PASS: TestTransportClosesBodyOnInvalidRequests/invalid_header_key (0.00s) | |
--- PASS: TestTransportClosesBodyOnInvalidRequests/invalid_header_value (0.00s) | |
--- PASS: TestTransportClosesBodyOnInvalidRequests/non_HTTP(s)_scheme (0.00s) | |
--- PASS: TestTransportClosesBodyOnInvalidRequests/no_Host_in_URL (0.00s) | |
=== RUN TestDontCacheBrokenHTTP2Conn | |
TestDontCacheBrokenHTTP2Conn: transport_test.go:6062: got conn: 127.0.0.1:60844, reused=false, wasIdle=false, idleTime=0s | |
--- PASS: TestDontCacheBrokenHTTP2Conn (0.08s) | |
=== RUN TestTransportDecrementConnWhenIdleConnRemoved | |
--- PASS: TestTransportDecrementConnWhenIdleConnRemoved (0.12s) | |
=== RUN TestAltProtoCancellation | |
--- PASS: TestAltProtoCancellation (0.00s) | |
=== CONT TestCmdGoNoHTTPServer | |
=== CONT TestReadResponseCloseInMiddle | |
=== CONT TestMissingStatusNoPanic | |
=== CONT TestOmitHTTP2Vet | |
=== CONT TestConsumingBodyOnNextConn | |
=== CONT TestOmitHTTP2 | |
=== CONT TestRequestWriteTransport | |
--- PASS: TestMissingStatusNoPanic (0.04s) | |
--- PASS: TestReadResponseCloseInMiddle (0.17s) | |
--- PASS: TestRequestWriteTransport (0.22s) | |
--- PASS: TestConsumingBodyOnNextConn (0.27s) | |
--- PASS: TestOmitHTTP2Vet (4.51s) | |
--- PASS: TestCmdGoNoHTTPServer (5.74s) | |
--- PASS: TestOmitHTTP2 (13.36s) | |
PASS | |
ok net/http |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
285c285 | |
< bufw *bufio.Writer | |
--- | |
> bufw bufferedWriter | |
428c428 | |
< w *bufio.Writer // buffers output in chunks to chunkWriter | |
--- | |
> w bufferedWriter // buffers output in chunks to chunkWriter | |
839c839 | |
< func newBufioWriterSize(w io.Writer, size int) *bufio.Writer { | |
--- | |
> func newBufioWriterSize(w io.Writer, size int) bufferedWriter { | |
843c843 | |
< bw := v.(*bufio.Writer) | |
--- | |
> bw := v.(bufferedWriter) | |
848c848 | |
< return bufio.NewWriterSize(w, size) | |
--- | |
> return &safeWriter{Writer: bufio.NewWriterSize(w, size)} | |
851c851 | |
< func putBufioWriter(bw *bufio.Writer) { | |
--- | |
> func putBufioWriter(bw bufferedWriter) { | |
880a881,893 | |
> sawEOFMu sync.RWMutex | |
> } | |
> | |
> func (ecr *expectContinueReader) setSawEOF() { | |
> ecr.sawEOFMu.Lock() | |
> defer ecr.sawEOFMu.Unlock() | |
> ecr.sawEOF = true | |
> } | |
> | |
> func (ecr *expectContinueReader) getSawEOF() bool { | |
> ecr.sawEOFMu.RLock() | |
> defer ecr.sawEOFMu.RUnlock() | |
> return ecr.sawEOF | |
894c907 | |
< ecr.sawEOF = true | |
--- | |
> ecr.setSawEOF() | |
1173c1186 | |
< func (h extraHeader) Write(w *bufio.Writer) { | |
--- | |
> func (h extraHeader) Write(w bufferedWriter) { | |
1313c1326 | |
< if ecr, ok := w.req.Body.(*expectContinueReader); ok && !ecr.sawEOF { | |
--- | |
> if ecr, ok := w.req.Body.(*expectContinueReader); ok && !ecr.getSawEOF() { | |
1486c1499 | |
< func writeStatusLine(bw *bufio.Writer, is11 bool, code int, scratch []byte) { | |
--- | |
> func writeStatusLine(bw bufferedWriter, is11 bool, code int, scratch []byte) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment