Ecosyste.ms: OpenCollective

An open API service for software projects hosted on Open Collective.

github.com/ooni/oohttp

Fork of Go stdlib's net/http that works with alternative TLS libraries like refraction-networking/utls.
https://github.com/ooni/oohttp

net/http/httputil: rewrite flushing code, disable on Server-Sent Events

* Rewrite the flushing code to not use a persistent goroutine, which
also simplifies testing.
...

8c2211bfd45c141d786e963176237902e786c2d3 authored over 6 years ago
all: fix a bunch of misspellings

Change-Id: I94cebca86706e072fbe3be782d3edbe0e22b9432
GitHub-Last-Rev: 8e15a40545704fb21b41a87680...

63b30b06254a57705b8c09cd5bf8c5ba697cafb3 authored over 6 years ago
all: fix a bunch of misspellings

Change-Id: If2954bdfc551515403706b2cd0dde94e45936e08
GitHub-Last-Rev: d4cfc41a5504cf10befefdb881...

7b9ac74e035f184643a38c2ea26be4d467c7872b authored over 6 years ago
io: export StringWriter

And start using it elsewhere in the standard library, removing the
copies in the process.

While...

1f74c6de0962c69ea6d617cb92709e78b0cc25bd authored over 6 years ago
net/http: log call site which causes multiple header writes

If an illegal header write is detected, find the first caller outside of
net/http using runtime....

7dec6cf234d453dc7e4dc5dc0f165a3c0bbb1dd1 authored over 6 years ago
net/http: explain more how Pusher.Push works

This will clarify that the resources are not completely pushed yet when `Push` returns and that ...

6b339f610940493cc5b1b809ee5a8d3dad321e79 authored over 6 years ago
net/http: add missing words to SameSite doc/comments

Change-Id: Ie7f6592d726eba73a5e6b3203e083bff55ff8e4e
GitHub-Last-Rev: 4e317b39dd337f95aa7b7f3219...

a83eb951afe131bf082bb70c19ec17ee30126e48 authored over 6 years ago
net/http: make Transport send WebSocket upgrade requests over HTTP/1

WebSockets requires HTTP/1 in practice (no spec or implementations
work over HTTP/2), so if we g...

fb6121dc1bd830268e3f494d8875abfae7d5b23f authored over 6 years ago
net/http: rewind request body unconditionally

When http2 fails with ErrNoCachedConn the request is retried with body
that has already been rea...

7c93c03bc33efd5cc0fe9bb08072281107fd9314 authored over 6 years ago
net/http: document Header.Set canonicalizes the header key

Fixes #27923

Change-Id: Ia902a1966beeae56e43265fc5ed987555fa834b6
Reviewed-on: https://go-revie...

3199ee3addc7009d8fa8e10b0049f0796c9eb48d authored over 6 years ago
net/http: add Handle example

Currently there is no example for http.Handle in the
documentation. This adds an example.

Chang...

ea2d521ab662beb69df096edb4436035b072d165 authored over 6 years ago
all: remove repeated "the" from comments

A simple grep over the codebase for "the the" which is often
missed by humans.

Change-Id: Ie4b4...

b5ccdbe6fee8c667d7513158e075a1db584b8859 authored over 6 years ago
net/http: add http.NotFoundHandler example

Change-Id: I6a69c7a5b829a967d75e1c79210a4906c0d8f505
Reviewed-on: https://go-review.googlesource...

feac9e9dc8112b7e75c0b2e9a0c71f2809f36ccd authored over 6 years ago
all: use strings.ReplaceAll and bytes.ReplaceAll where applicable

I omitted vendor directories and anything necessary for bootstrapping.
(Tested by bootstrapping ...

4829899244f5b4957dacc30631b174b263c7566a authored over 6 years ago
net/http: configure http2 transport only once

it looks like we should abort trying to configure the http2 transport
again, once it has been co...

10c372482c673955ee8d6dab37b09b361ed3f5f5 authored over 6 years ago
net/http: ensure null body in Fetch response is not read

The Fetch API returns a null body if there is no response body,
on browsers that support streami...

0e62502884085654289f2b584d405c8ac0a1a898 authored over 6 years ago
net/http: use Header.clone rather then duplicating functionality

cloneHeader duplicates what Header.clone() method is doing. It's
used in a single place, which c...

89a669d71fb1ea646af6a5b0bbbdff2bc10d8833 authored over 6 years ago
net/http: fix minor typos in Request godoc

Fixes missing commas where it wasn't immediately apparent whether
"requests" was being used as a...

626479194c9e2b85ef20d2f21b6b2b385ea09696 authored over 6 years ago
net/http: add example for http.HandleFunc

Change-Id: Id0e2fb2abad5b776ac0ed76e55e36c6b774b5b7a
Reviewed-on: https://go-review.googlesource...

0f6feb5f325528ac5fe8dc40a8a72adc4a760218 authored over 6 years ago
net/http: make Transport return Writable Response.Body on protocol switch

Updates #26937
Updates #17227

Change-Id: I79865938b05c219e1947822e60e4f52bb2604b70
Reviewed-on:...

4917f4a852a181157d3bdbc93d429f07f28e9303 authored over 6 years ago
net/http: add an example of creating a custom FileSystem

The existing documentation of http.Dir is clear in that, if you want to hide
your files and dire...

1aaebd7496317fce0e72d37d52afba78809b9385 authored over 6 years ago
net/http: add test showing that ReverseProxy HTTP/2 bidi streaming works

Change-Id: I8361ae33c785e45e3ccc7e9bc2732c887eeb41c4
Reviewed-on: https://go-review.googlesource...

35bcc2b23f88e3bc089be3b4fb282c69aed55d9c authored over 6 years ago
net/http: use internal/race

Change-Id: Iaa5ded13e8ab4753e2e3d04c9fff203d854208ba
Reviewed-on: https://go-review.googlesource...

60142e203ee6c765c4329a8fa5ef1a78a8b15be3 authored over 6 years ago
net/http: fix cookie SameSite docs grammar

Change-Id: I76d878343c1cc14b53c700b0476ca050c1f9e6be
GitHub-Last-Rev: 148a45f4b63f7f55312112bbbd...

bebb8a6dde6e70965bb8df8a1e267799c330d699 authored over 6 years ago
net/http: remove unnecessary return

Change-Id: I93bc5de6bcb23c2639d7c2f3f5252fb6f09ca6e4
Reviewed-on: https://go-review.googlesource...

bcb762e6a6d67356e51e2296fce49a3aa5b80e13 authored over 6 years ago
net/http: add Client.CloseIdleConnections

Fixes #26563

Change-Id: I22b0c72d45fab9d3f31fda04da76a8c0b10cd8b6
Reviewed-on: https://go-revie...

2a892e52e8ead2a812a7418dd101ca222f5b0189 authored over 6 years ago
all: update stale test skips

Issues #10043, #15405, and #22660 appear to have been fixed, and
whatever tests I could run loca...

ae762ca654cac782d70a2042e2eef1c1514a16fe authored over 6 years ago
net/http: support configuring fetch options

The default WASM RoundTripper is implemented using
the browser Fetch API. Some options don't rea...

d392fa044663dfca46a6dbb315810d98b10a94e2 authored over 6 years ago
net/http: update request cancelation docs

Fixes #26101

Change-Id: Id4def032b846257d2de992b7561ac90a17e08b91
Reviewed-on: https://go-revie...

4d2dfe0e165d71c04194b5f4a8999f34d13b7fd6 authored over 6 years ago
net/http: revert CL 89275 (don't sniff Content-Type when nosniff set)

Also updates the bundled http2 to x/net/http2 git rev 49c15d80 for:

http2: revert CL 107295 ...

1586aa65a62fb3ceff78dcc2112a89c25c0c3fef authored over 6 years ago
net/http: expand a TimeoutHandler test a bit

Updates #22821

Change-Id: I2d0d483538174a90f56c26d99bea89fe9ce4d144
Reviewed-on: https://go-rev...

7ba17d836e86e387330bf07f4895b397e653bdb6 authored over 6 years ago
net/http: document Transport.Proxy's https support

The net/http module added support for HTTPS proxies in CL 68550, but the
Transport.Proxy docstri...

43c09258b7f31cc45f5e15c9f7e92969d2c8e715 authored over 6 years ago
net/http: try to document ServeFile security more

We've expanded this several times. Try more.

Fixes #18837

Change-Id: I03b699391351a30ee60a15d7...

2e0e2e86581dd7e903191e88a15d556ec233498f authored over 6 years ago
net/http: fix and normalize the [Server.][ListenAnd]Serve[TLS] docs

The only inaccurate part was the HTTP/2 caveat in Server.ServeTLS, which
only applies to the pla...

da3ff64c737bfc1c4734f7bffca654a9aecfdc0c authored over 6 years ago
net/http: document that Client methods always return *url.Error

Updates #9424

Change-Id: If117ba3e7d031f84b30d3a721ef99fe622734de2
Reviewed-on: https://go-revi...

447a324db902e8e8a50f01b0606cbc2fda068971 authored over 6 years ago
net/http: deflake TestRetryRequestsOnError

There's a 50ms threshold in net/http.Transport that this test
sometimes hitting on slower device...

dd3709a12e54842538e92ceb0b2ecbb9afb9833b authored over 6 years ago
net/http: update Serve docs on when HTTP/2 is enabled

Contains portions and modified portions of CL 103815

Fixes #24607

Change-Id: Ic330850a0f098f18...

4ea02eba77f33c1ff360fdc52e1d92e0cf3b21d1 authored over 6 years ago
net/http/httptest: guarantee ResponseRecorder.Result returns a non-nil body

The doc for ResponseRecorder.Result guarantees that the body of the returned
http.Response will ...

4896bd4720db5324665c32ccd11beca3551de661 authored over 6 years ago
net/http: update bundled http2

Updates http2 to x/net/http2 git rev a680a1efc54 for:

http2: reject large SETTINGS frames or...

245f131b7a200a654d005de3cce3a6e0066a8bec authored over 6 years ago
net/http: deflake TestClientTimeoutKillsConn_AfterHeaders

It was flaky on slower machines.

Per report at https://github.com/golang/go/issues/23399#issuec...

fac457fb0f9c38c00fef23e1728dc45ef5953a64 authored over 6 years ago
http/internal: document final CRLF behavior on chunkedWriter

Change-Id: I0f76b40dbfda2d382c88aec377db1851c4ac7441

Change-Id: I0f76b40dbfda2d382c88aec377db18...

7f9673f5d97a3a516b701a0eb1c9a30e6eaee257 authored over 6 years ago
net/http: don't cancel Request.Context on pipelined Server requests

See big comment in code.

Fixes #23921

Change-Id: I2dbd1acc2e9da07a71f9e0640aafe0c59a335627
Rev...

04b1390cb4a7b11d1816b729a09cea20fd2f4255 authored over 6 years ago
http/http/httputil: add ReverseProxy.ErrorHandler

This permits specifying an ErrorHandler to customize the RoundTrip
error handling if the backend...

da7c47c64c7bc886adfb8eb87c6372e541d23d49 authored over 6 years ago
net/http: correct use of byte slice in js syscall

syscall/js does not allow []byte to be used in direct inputs to
its JavaScript manipulation meth...

1ebaa19dcf3d199a2d0ba4e4564ef912069273ed authored over 6 years ago
net/http: update bundled http2

Updates bundled x/net/http2 to git rev d0887baf81f4 for:

http2: ignore unknown 1xx response...

25904ca55fe01f3066573c82b8555e0ba639d82d authored over 6 years ago
net/http: make Transport.CloseIdleConnections close non-bundled http2.Transport

Previously Transport.CloseIdleConnections only closed the HTTP/2
Transport's idle connections if...

f02b1f19dcc67550ae847b0218dfa8e2eba3e18a authored over 6 years ago
net/http: update bundled http2

Updates bundled x/net/http2 to git rev cffdcf67 for:

http2: use GetBody unconditionally on ...

9206bd514d4a497d8b5dddc5626499f5262de6ab authored over 6 years ago
net/http: add tests to validate that Client.Timeout closes connections

For #23399

Change-Id: I9bc7c21fda6bfa89af2e7656e5c85aa9edd4f29e
Reviewed-on: https://go-review....

45ca2c3997c366a2d0f934dbb12dfdbbe2f84692 authored over 6 years ago
net/http: fix rare Transport leak, remove incorrect defensive logic

Remove some incorrect code that was present after since I added
support for idle timeouts in CL ...

6cd9969ee8fefff49ea9476b61d51630134538c8 authored over 6 years ago
net/http: clarify when it's allowed to reuse a Request

Fixes #21780

Change-Id: Ic6fb6a536fff800a05be2d25309f72092604a785
Reviewed-on: https://go-revie...

a1afd37cdd1448e0083d057f3b80408a3686aa03 authored over 6 years ago
net/http: update bundled http2

Updates http2 to x/net/http2 git rev 292b43b for:

http2: reject incoming HEADERS in Server ...

b52bff933d1cff4c59f35f5ce14a352852431831 authored over 6 years ago
net/http: remove dead code noted in post-submit review of CL 81778

Per comments in https://github.com/golang/go/issues/20239#issuecomment-402199944

Updates #20239...

f6af53512108bd28f40d7c7868ac516001531a2f authored over 6 years ago
net/http: update bundled http2

Adds tests for #122590 and updates x/net/http2 to git rev 6a8eb5e2b1 for:

http2: call http...

7fd9b1717ac39230491b1f8e4754e7f9e8e5e93a authored over 6 years ago
net/http/httputil: don't panic in ReverseProxy unless running under a Server

Prior to the fix to #23643, the ReverseProxy didn't panic with
ErrAbortHandler when the copy to ...

470ac84cd1a0c59856694d84f4a4b211eee1eea6 authored over 6 years ago
net/http: add support for SameSite option in http.Cookie

The same-site cookie attribute prevents a cookie from being sent along with
cross-site requests....

434da8a66c2e3214b8cd2f9b9a54eddb1986fbef authored over 6 years ago
vendor: update vendored x/net/http/httpproxy

This updates x/net/http/httpproxy to git rev c21de06a for:

http/httpproxy: support CIDR not...

b3d7fe8c54345cdca505d0f335c003b34d0582b6 authored over 6 years ago
net/http: comment handleReadError more, superficially use its argument

Fixes #24201

Change-Id: Ib970c4eeaa90489d014482276a7e5afa94a50741
Reviewed-on: https://go-revie...

03625a7b6a3749534ad661192a91170c70bf0e53 authored over 6 years ago
net/http: add Transport.MaxConnsPerHost knob

Add field to http.Transport which limits connections per host,
including dial-in-progress, in-us...

3508600ac8146bf86017abfe3c775b444bc20e67 authored over 6 years ago
all: clean up some Deprecated comments

Change-Id: Ie801fe6a2883d79229ee2955e26948c1b4964802
Reviewed-on: https://go-review.googlesource...

67c3a5f8c537c749701b522207c696f666f622aa authored over 6 years ago
net/http: deflake TestServerShutdownStateNew

This function tests that calling Shutdown on a Server that has a "new"
connection yet to write a...

0850b9cf3761c04b4a47ea61788b73c54f30c6ce authored over 6 years ago
net/http: make Transport treat 101 as a terminal status

Before CL 116855, Transport would only skip over 100 (expect-continue)
responses automatically a...

14ec63b27f3955e0466c8ed35f3560d93cef5575 authored over 6 years ago
net/http: prevent Server reuse after a Shutdown

Fixes #20239

Change-Id: Icb021daad82e6905f536e4ef09ab219500b08167
Reviewed-on: https://go-revie...

480196d1b5d444de4ad3fdc7d4da7ea8e071017a authored over 6 years ago
net/http: update bundled http2

Updates http2 to x/net/http2 git rev 97aa3a539 for:

http2: dynamic table updates must occur...

a08da142938846c8b3f276bfa9f6857bef5d1d2f authored over 6 years ago
net/http: update docs on Transport.DisableKeepAlives

Be super explicit that HTTP keep-alives != TCP keep-alives.

Fixes #26128

Change-Id: I77d74a6fe...

4faf5c2cda328d8fe14262e2b66c1b5bb5865103 authored over 6 years ago
net/http: remove a flag accidentally submitted in CL 121419

I thought I removed this but failed to amend it to my commit before
submitting.

Change-Id: I2d6...

e9353e516bc8b22222a007f1dc75199aa29e8721 authored over 6 years ago
net/http: make Server.Shutdown treat new connections as idle after 5 seconds

The Server distinguishes "new" vs "idle" connections. A TCP connection
from which no bytes have ...

5de649cff61ae2b30a9c7108f2d220fa8e9abf87 authored over 6 years ago
syscall/js: rename Callback.Close to Release and expose Callback.Value

This makes Callback more in line with TypedArray. The name "Release" is
better than "Close" beca...

c31edb47e279b5a4b471b1693a468f6c03485f8b authored over 6 years ago
syscall/js: add TypedArrayOf

The new function js.TypedArrayOf returns a JavaScript typed array for
a given slice.
https://dev...

f2c8754c9f5a838dff8a200e2c8e5927437b15c6 authored over 6 years ago
net/http/httptrace: add clarification never added to CL 67430

Updates #19761

Change-Id: Iac3bd4c40002f8e348452b50bff54dee3210d447
Reviewed-on: https://go-rev...

df4869660835873cbd8cd92ac7c1de041722f659 authored over 6 years ago
net/http/httptrace: expose request headers for http/1.1

Some headers, which are set or modified by the http library,
are not written to the standard htt...

b7bb1fb7574f7e64f7ed9e02f29d7c959f34f60f authored over 6 years ago
net/http: document and test behavior of ServeMux with ports

Beginning on Go 1.9, ServeMux has been dropping the port number from the Host
header and in the ...

41535327c66c1a58a4f14c4f097c5067a90480a8 authored over 6 years ago
syscall/js: turn constant package vars into functions

This is so the values can not be changed and the type is easy to see.

Requested on https://go-r...

a2de74408259ef5e27067f61a025f86762fa03c0 authored over 6 years ago
net/http: fix test assertion

Logf doesn't make the test fail, so the test was always OK.

Change-Id: I7c10ee74ff7e5d28cbd3a35...

2ab32bbe308c2a49bae5e0f0e48cc4d17570cbe1 authored over 6 years ago
net/http: avoid deferred unlock in ServeMux.shouldRedirect

CL 96575 introduced concurrency protection for
ServeMux.shouldRedirect with a read lock and defe...

54a4a43356bc2a846ed13d3c4e73c8ee70bc1531 authored over 6 years ago
net/http: document how Hijack and Request.Context interact, take two

Second try. The previous version (CL 115039 in git rev 3988863) wasn't
accurate.

Fixes #22347

...

350d7488f538db9f68ed53604273755f6c82a7ab authored over 6 years ago
net/http: document that Handlers are resposible for validating Host headers

Fixes #23993

Change-Id: I112415c894e8c680bfc17d53772275430e46794b
Reviewed-on: https://go-revie...

0940ef50f0ea1d3b1e253cc31251c591e5977a73 authored over 6 years ago
net/http: ensure that Listener.Close is called only once in Server.Serve

Fixes #24803

Change-Id: I8b1e7c5a74018a0c333f8c38a7ec5f5827ab1606
Reviewed-on: https://go-revie...

3bdefbddcfa9fedfe31ca7f3959543a3932a0927 authored over 6 years ago
net/http: make Transport.RoundTrip check context.Done earlier

Fixes #25852

Change-Id: I35c630367c8f1934dcffc0b0e08891d55a903518
Reviewed-on: https://go-revie...

1f9aac306c33d7386bce5ffac811d6ae81f705b0 authored over 6 years ago
net/http, net/http/httptrace: make Transport support 1xx responses properly

Previously the Transport had good support for 100 Continue responses,
but other 1xx informationa...

2509c97043cf0c02643dd41477ac769be562ce35 authored over 6 years ago
net/http: add application/wasm mime type

Although not part of http://mimesniff.spec.whatwg.org,
for WASM streaming compilation to happen,...

f1332df69c78e7ab1293c9355e974797d167f913 authored over 6 years ago
net/http/httptest: deprecate ResponseRecorder.HeaderMap

Users of this field are better off using Result instead.

Fixes #25763.

Change-Id: I4391afa6ed3...

f101a3c114a97255e7e484f9579f224380a6fb58 authored over 6 years ago
net/http: remove an allocation in ServeMux

Also, add a benchmark variant ("SkipServe") that only benchmarks the
ServeMux handler selection ...

edc68ee105194fe57a4fd5104fc259fff03edf13 authored over 6 years ago
net/http: document Transport.Dial concurrency

Fixes #25019

Change-Id: I715e3bb560b2a0301240cecb09a5126ab04a666e
Reviewed-on: https://go-revie...

a579cc71530cc82e84a12b3c1a110b47bf4b01e4 authored over 6 years ago
net: add js/wasm architecture

This commit adds the js/wasm architecture to the net package.
The net package is not supported b...

f4c1725851a9c18d2bd9be77419015a918e9237c authored over 6 years ago
net/http: fix build errors on js/wasm target

The in-progress WASM port does not yet have sufficient automatic
testing performed against it, s...

2068e20c5379a2c4e84aab297a6c06017ba30787 authored over 6 years ago
all: update comment URLs from HTTP to HTTPS, where possible

Each URL was manually verified to ensure it did not serve up incorrect
content.

Change-Id: I4dc...

71d7b58109593cc888437637ddb80dec1c15fccf authored over 6 years ago
net/http: use fake Transport network when running in Node

Replaces the existing local loopback check with a check to see
whether the program is being inte...

a1b2a0231d16fce190b29638519e3bf88157be3b authored over 6 years ago
net/http: use DialWithConn method of socks.Dialer

This change uses the DialWithConn method of socks.Dialer to ensure that
the bundled SOCKS client...

913a388c5fe296a13a31b5a86a19021d7fd8cb5a authored over 6 years ago
net/http/httputil: reduced log verbosity in reverseproxy_test.go

For functions TestClonesRequestHeaders and TestReverseProxy_PanicBodyError,
I made changes to up...

7311ca31875613725db277030ad9460e8aad2612 authored over 6 years ago
net/http: add js/wasm compatible DefaultTransport

Adds a new Transport type for the js/wasm target that uses the
JavaScript Fetch API for sending ...

464b601f6e2d3cf413226c90b2449dfcead3a098 authored over 6 years ago
net/http: fix typo in comment

Change-Id: Ibb21c12bf67b2648eb7606bee8ec1b54e6c70dd5
Reviewed-on: https://go-review.googlesource...

6664392fe539e2f4efd0281316a6c9cff71f7dee authored over 6 years ago
net/http: document Server's implicit Content-Length response header

Fixes #23450

Change-Id: I829399194299d2e6d5e754b60e8f72b321b5da90
Reviewed-on: https://go-revie...

a64267dd64ccdff2dfb3bb772880bc8f0e005962 authored over 6 years ago
net/http/httputil: pass through any "TE: trailers" header to backend

Fixes #21096

Change-Id: I2a4688a79bdaa25b4e8ef38e3390d93d3d0bce04
Reviewed-on: https://go-revie...

199b25ff4366ce5bfe3ca8cc4454112d352c9fd0 authored over 6 years ago
net/http: vendor x/net/http/httpproxy, use it in net/http

From x/net git rev c7086645de2.

Updates #16704

Change-Id: I4d642478fc69a52c973964845fca2fd4027...

a45df00c8174ef3804812f1ea8faf58766be0f13 authored over 6 years ago
net/http: document how Hijack and Request.Context interact

Fixes #22347

Change-Id: If86aa5d54cfd7a7c32d630fb2bf4f47e057dbfb2
Reviewed-on: https://go-revie...

dd3e1c7bf8398b4bee2f062775d920c6d9c3c2de authored over 6 years ago
net/http: conservatively flush Transport request headers by default

This changes the http.Transport to flush the bufio.Writer between
writing the request headers an...

f3d4dbd818cee6e043a9bcd134a7f4b857e98008 authored over 6 years ago
net/http: fix doc comment on PostFormValue function

This function checks Request.PostForm, which now includes values parsed
from a PATCH request.

C...

f91be0a55f877eb08e3ff496db9b77f352455e5f authored over 6 years ago
net/http: clarify that ReadRequest is only for HTTP/1.x

Fixes #25476

Change-Id: I5a81cdf7d0ef9a22b0267732f27bcc2ef76eaa29
Reviewed-on: https://go-revie...

f744118e26dc90763bbd198895c2c73a0a3b0bac authored over 6 years ago
net/http/httptest: table-test using named subtests

Use Go 1.7 Run method of testing.T to run the table-driven tests into
separate, named subtests. ...

55eed25f519efbf2fb35be9a78e5e439ea89eec9 authored over 6 years ago
net/http/pprof: fix typo on new index page

s/thread/thead/ as this is Table HEAD and not a thread as indicated by
the closing tag an contex...

9a1202d1b079e9aa6d59011fbedb8776e9e35d17 authored over 6 years ago