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: various small cleanups

* Remove an unnecessary type conversion
* Make golint happier about consistent receiver names
* ...

ebd5ae80f8f11a5e06792a24aab5fa6fcb148ac9 authored over 7 years ago
net/http: remove an unused variable in readCookies function

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

079f16baf07e752136133e87ae3131e8c4c72c30 authored over 7 years ago
net/http: log Readdir error to Server.ErrorLog

Now that issue #12438 is resolved, this TODO can be completed.
Create a logf helper, which is si...

d913e3f39d6289fc5e9b425849f0e7a28d3faae9 authored over 7 years ago
net/http: check If-Range header when request method is HEAD

When If-Range does not match and the requested resource is
available, server should return a "20...

ba25d01cc9653f348024670bb5bc4e25c2a4fe24 authored over 7 years ago
net/http: update bundled http2

Updates http2 to x/net/http2 git rev 1c05540f687 for:

http2: fix format argument warnings in ...

e2bf64a2c9625fc8e6c91170d2e709e09c30daf3 authored over 7 years ago
net/http: set Content-Type header in Redirect

Setting the Content-Type header explicitly allows browsers to know what
the type of the content ...

af305b3b67fac804ca4a2159832da8eddf49fa48 authored over 7 years ago
net/http: document that after Hijack, Request.Body is invalid

We can make it panic with a more explicit and readable error message
during Go 1.10, but documen...

0430b98017ac12ca05e68188e4f0e910cbf80fed authored over 7 years ago
net/http: improve signature of Redirect, NewRequest

In CL https://golang.org/cl/4893043 (6 years ago), a new package named
"url" was created (it is ...

69fd6967da9a2fad090a1a1d2915236d5974d266 authored over 7 years ago
net/http: fix parameter name in comment

Fixes #21077

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

59f38051aca11ead9c13dbf8ced9303fdb070987 authored over 7 years ago
net/http: clarify Handler panic behavior across HTTP versions

Updates #18997

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

a4a955649519d751274675416040673d01ee5b00 authored over 7 years ago
net/http/httptest: allow creation of Server manually

The Server struct has exported fields, which allows users to manually
create a Server object wit...

cbac5bb8fdb8a616f18786529bd152489433e1f1 authored over 7 years ago
net/http: update bundled http2

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

http2: refund connection flow control...

dee372a27289f19016104423f41c882d706c8b92 authored over 7 years ago
net/http: whitelist another non-http goroutine in leak checker

Fixes #20810

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

163b8f8881a7f04ecb306ee71418b4dc6ce70e26 authored over 7 years ago
net/http/pprof: mention mutex profile in doc

mutex profile requires explicit calls to
runtime.SetMutexProfileFraction to enable/disable
profi...

8cf9252f4187486791634db9993ef1b65b1e07f7 authored over 7 years ago
net/http: fix double-close of req.Body

Add a test and fix for the request body being closed twice.

Fixes #19186

Change-Id: I1e35ad4ae...

762922e7c54eae0702fefec486723fb7c38a431f authored over 7 years ago
net/http/httputil: always deep copy the Request.Header map in ReverseProxy

We used to do it sometimes as an optimization, but the optimization is
flawed: in all non-contri...

42047405e35031479b252a153e1625ef7a5246bc authored over 7 years ago
net/http/httptest: close client connections in separate goroutines

The existing implementation sequentially closes connection in the loop
and until the previous cl...

2e45fc1105742c2a410613871d381704f071c22c authored over 7 years ago
net/http: document that Dir can serve sensitive directories

Updates #20759.

Change-Id: Ic61dcb6d101ad1491dca535aebb6ee8ee740d013
Reviewed-on: https://go-re...

594aab01b45e494593aa8d1279b49475cce4ffcf authored over 7 years ago
net/http: Update server idleTimeout documentation

Fixes #20383

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

979c1453222638112a0d0d434a583e50f66ede54 authored over 7 years ago
net/http: update bundled http2

Updates http2 to x/net/http2 git rev 3d7ac2a5d for:

http2: fix Server race
https://gola...

7331d9196af4bd811734c4fad0a0dac16038b9b5 authored over 7 years ago
net/http: update bundled http2

Updates http2 to x/net/http2 git rev 973f3f3 for:

http2: make Transport treat http.NoBody li...

2dab6d22d181f91ee9688c7d26f918ff44281504 authored over 7 years ago
net/http: add a known goroutine, don't check goroutine leaks in benchmark mode

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

fb9b5f1e9f19c71473315b0cca678ce24d730958 authored over 7 years ago
net/http: document SOCKS5 proxy support

Fixes #20618

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

2b9aae135464c97c1da65bb6462331845a375133 authored over 7 years ago
net/http: update bundled http2

Update x/net/http2 to git rev 6b17b9baf5 for:

http2: stop rejecting outgoing paths beginning...

be2b1ada03432794772bddc0c582d0a7f7f67d7d authored over 7 years ago
net/http: fix application/ogg sniff signature

I accidentally set the wrong pattern mask as
* []byte("\x4F\x67\x67\x53\x00") --> "OggS", the by...

90129e1771437dbf6b99661dac0ac3f574c6f7f3 authored over 7 years ago
net/http: regenerate http2 bundle with bundle fixes to include comments

The golang.org/x/tools/cmd/bundle tool previously had a bug where it
dropped some comments.

Thi...

fc03bbf291e2eb193aeca58245535650ead45e5b authored over 7 years ago
net/http: remove invalid checks of Request.Proto* for outgoing requests

The net/http package has long documented that Request.ProtoMajor and
Request.ProtoMinor are igno...

8e944edca2898950a4113dca3d97048d75ef935b authored over 7 years ago
net/http: simplify recently added TestServeTLS

TestServeTLS was added in CL 44074, merged today.
This cleans up the test a little.

Updates #13...

048ac565df97b239c3d5f0a43a6c674f2f6d59ec authored over 7 years ago
net/http: add Server.ServeTLS method

Server.ServeTLS wraps Server.Serve with added TLS support. This is
particularly useful for servi...

f14b8b7195cfce91c78c33928e556441c79e29d6 authored over 7 years ago
net/http: enable TestLinuxSendfile on mips64

The test is passing on a 64bit RFS.

Fixes #18008

Change-Id: Ia4c4f4dde0392c7f6bbe5dbffc97cf848...

3a3bf7541a900fc7e96cd1a26840e7641fee38bd authored over 7 years ago
net/http: delete vestigial method

Fixes #19850

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

4b29d09dcebb4544ec718a76e530707fae21985d authored over 7 years ago
net/http: don't crash in Request.WithContext if Request.URL is nil

Fixes #20601

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

ee480a5c1f3a2e879586889c654ad3632d5081c4 authored over 7 years ago
net/http: make Transport retry GetBody requests if nothing written

This is another attempt at the change attempted in
https://golang.org/cl/27117 and rolled back i...

722d5962f684ab948aaa00a244617b134bc28b95 authored over 7 years ago
net/http: update bundled x/net/http2

This updates the bundled copy of x/net/http2 to x/net git rev
3470a06c1357df53 for:

http2: fix ...

81e544acdc0a1d2eba18510d9c0a8e0693c6b3ed authored over 7 years ago
net/http: revert CL 43779

CL 43779/commit 6a6c792eef55eded7fb3165a330ec2b239b83960
broke the builds at tip, and that CL do...

c8832f281f09177f2b396ba7f2499ab86de6727f authored over 7 years ago
net/http: Don't write 'Connection: close' header multiple times.

When writing the 'Connection: close' header based on response Close
attribute we also check if i...

4c870523aaab343299d34a2bd7151123875af6a3 authored over 7 years ago
net/http: deep copy Request.URL also in Request.WithContext's copy

Despite the previously known behavior of Request.WithContext
shallow copying a request, usage of...

ab1953df349ada4227ea62866f038e95887e3e5a authored over 7 years ago
net/http: permit incoming CONNECT requests without Host headers

Apparently they exist in the wild. See:
https://github.com/golang/go/issues/18215#issuecomment-3...

78b8811ee2b940098b17a8196c500bfa1dae8549 authored over 7 years ago
net/http: polish gzip case insensitive test

Avoid directly using the binary of the
gzipped encoded string in the handler.

Follow up of CL 3...

1323c782cd6cbdb3200f354afc73cc92acfd83de authored over 7 years ago
net/http: make Transport respect non lower case Content-Encoding

The existing Transport implementation does not detect gzip encoding
when the Content-Encoding he...

935d6eb5bf2493f68b4076fbf02f865672615264 authored over 7 years ago
net/http: update bundled x/net/http2

This updates the bundled copy of x/net/http2 to x/net git rev a8e8f92cd6 for:

http2: remove...

64af84e14499716409842cc32e8e3bbe38e5decc authored over 7 years ago
net/http: Add Server.RegisterOnShutdown

This will be used to allow http2 servers to register a shutdown function
so that net/http.Server...

819fffc31e5d72ad4867ae176a29c085006a8bc3 authored over 7 years ago
net/http/httptest: make ResponseRecorder.Result.Status match http.Transport

Fixes #18438

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

4bc068580d49eeb3054651d8b59c1d6e40f6de22 authored over 7 years ago
net/http/cookiejar: increase test coverage

The jarKey function handles broken PublicSuffixList implementations but
no test verified it.

Ch...

8c2b6c32789aef8ef298931e0608bade08d02a24 authored over 7 years ago
net/http: send more cookie values in double quotes

According to RFC 6255 a cookie value may contain neither spaces " "
nor commas ",". But browsers...

ef781d1ebdfce462415f66e030b9e96fba9293fa authored over 7 years ago
net/http/httputil: ReverseProxy should pass on unannounced Trailers

Trailers that are not announced in the Trailer must be passed on to
the downstream client.

Rath...

0f25bf5bfd7f09ef66c89f005c2aad015c394133 authored over 7 years ago
net/http: make ServeMux preserve query string during redirects

Ensure that the implicitly created redirect
for
"/route"
after
"/route/"
has been registered...

9ab1c11b961f7f7d8cb323fa28828c27205de76a authored over 7 years ago
net/http: for http2, use the priority write scheduler by default

Updates #18318

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

db4c8a399a81b7e8f58b74c47882528e8074d888 authored over 7 years ago
net/http: update bundled http2

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

http2: add all bad ciphers, use p...

bbcc81fac6ae20350598036d7957b19d90a9813d authored over 7 years ago
net/http: bgErr is unused; remove it

Fixes #20196.

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

1d1d8608ceede7ba25b019ff12b7bd4eee15a3c9 authored over 7 years ago
net/http: enable TestRequestDoesntBodyCloseDoesntBlock

Fixes #7121.

CL 31173 inadvertently fixed this issue in the Go1.8 cycle.
This CL enables the te...

8fa826f19b8d8be6d94b5d192aa7097d66d6f462 authored over 7 years ago
net/http: re-simplify HTTP/1.x status line writing

It used to be simple, and then it got complicated for speed (to reduce
allocations, mostly), but...

2b2c95c6cb8987563a5ffedea9608ab25d9341e9 authored over 7 years ago
net/http: close resp.Body when error occurred during redirection

Fixes #19976

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

6919cb5172c6c5dd964fafddf14d755a9a077401 authored almost 8 years ago
net/http: make LocalAddrContext handle wildcard interface

The LocalAddrContext should have the network address of the actual
interface.

Fixes #18686

Cha...

1d014c370e24ca766462083aea91c37cb3ddaf31 authored almost 8 years ago
net/http: update bundled x/net/http2

This updates the bundled http2 package from git rev
5602c733f70afc6dcec6766be0d5034d4c4f14de of ...

96561689ee153e856916dad04aa4bf41cd0656f7 authored almost 8 years ago
net/http/cgi: fix plan9 build

Cleanup CL https://golang.org/cl/41691 broke the plan9 build by removing
a use of a package but ...

d5c1efbbca9ad7681c06bc1c57a8076f829383b2 authored almost 8 years ago
all: remove some unused parameters in test code

Mostly unnecessary *testing.T arguments.

Found with github.com/mvdan/unparam.

Change-Id: Ifb95...

b6550e4b19458fe7645a008255086ffb269774b7 authored almost 8 years ago
net/http: document Shutdown/Serve return behavior

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

36fdce45fd4f24a01310076fac9426c34d9c7114 authored almost 8 years ago
net/http: use bullet characters for godoc lists

Brad noticed a bullet list was rendered as preformatted text because of
the indentation. One can...

3d330ed6d7c537bf9e998ea41592e30fe69cfb63 authored almost 8 years ago
all: remove redundant returns

Returns at the end of func bodies where the funcs have no return values
are pointless.

Change-I...

04b06a7a3460b780d9f03897ecf9743ba94d15a4 authored almost 8 years ago
all: remove unnecessary ", _" from map reads

If the bool value isn't used, there is no need to assign to underscore -
there is a shorter form...

7b6a933bbeac1297db4bdbf9f2dbeca148b90198 authored almost 8 years ago
net/http: ignore extra space between response version and status code

Reading a response with a status line like "HTTP/1.0 401 Unauthorized"
(with two spaces after t...

ed3db7d2ef6f69cf109b8a7f7ac25d0de40fdb8d authored almost 8 years ago
net/http/fcgi: expose cgi env vars in request context

The current interface can't access all environment
variables directly or via cgi.RequestFromMap,...

c770f968f5cb3ff6ae935c4a74c2526abeee41ab authored almost 8 years ago
net/http: add tests for http2 Server WriteTimeout enforcement per stream

Updates #18437

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

a5f40f6ba28499e018be52b00190d86d7d1e5bd6 authored almost 8 years ago
net/http: fix ineffective break in etag scanning

In particular, this lead to the code accepting invalid ETags as long as
they finished with a '"'...

fe31a054ee49d185bc255b461467709f4df49ce1 authored almost 8 years ago
all: fix minor misspellings

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

9147d634188fc748d721c0c7a418e4803db66b98 authored almost 8 years ago
net, net/http: adjust time-in-past constant even earlier

The aLongTimeAgo time value in net and net/http is used to cancel
in-flight read and writes. It ...

7053460d9e9a4385b6b175df3b26392d0746d9e0 authored almost 8 years ago
net/http/httptest: don't panic on Close of user-constructed Server value

If the user created an httptest.Server directly without using a
constructor it won't have the ne...

d374add5c7f1fdbb0c15b7239e912f4c3760adc9 authored almost 8 years ago
net/http: Fix TestLinuxSendfile without strace permissions

If go doesn't have permission to run strace, this test hangs while
waiting for strace to run. In...

c84c66373b659d5e2c28dd423b08710d2cbf3c19 authored almost 8 years ago
net/http: strip port from host in mux Handler

This change strips the port in mux.Handler before attempting to
match handlers and adds a test f...

153e5755d9646598894e326e9f6e6b0988f9be0d authored almost 8 years ago
net/http: import updated idna package and adjust request.go

Custom logic from request.go has been removed.

Created by running: “go run gen.go -core” from x...

61b787cde43fd87d2f5158e92416046723020eb1 authored almost 8 years ago
net/http: improve speed of default mux

The DefaultServeMux included in net/http uses a map to store routes,
but iterates all keys for e...

e7a9bea06618c287b1a8ac766beab4ee9f94896d authored almost 8 years ago
net/http: fix possible nil pointer dereference in TestOnlyWriteTimeout

TestOnlyWriteTimeout assumes wrongly that:
- the Accept method of trackLastConnListener is calle...

a93f8571cba26f0517faf27c97ca3a6b2ecca97c authored almost 8 years ago
net/http/cookiejar: fix out-of-bounds errors on malformed domains

The old implementation of Jar made the assumption that the host names
in the URLs given to SetCo...

bc37a0a5e7cf31912182e7102266edc53c603a11 authored almost 8 years ago
net/http: fix ProxyFromEnvironment panic on invalid $NO_PROXY value

Given an entry in $no_proxy like ":1" we would interpret it as an empty
host name and a port num...

f80c94b76783f5b95e12656fa966e418a56c110e authored almost 8 years ago
net/http: deflake TestServerAllowsBlockingRemoteAddr more

As noted in https://github.com/golang/go/issues/19161#issuecomment-287554171,
CL 37771 (adding u...

01260011a57472cc9c65d6b5c681daa5bd869b5f authored almost 8 years ago
net/http: deflake TestServerTimeouts

Retry the test several times with increasingly long timeouts.

Fixes #19538 (hopefully)

Change-...

8190e73f94ffeb75235dfce1a3dc7594d932fbc5 authored almost 8 years ago
net/http: unset proxy environment after test

Fix last proxy in TestProxyFromEnvironment bleeds into other tests
Change ResetProxyEnv to use t...

abbc3f214ea23e9b36014c1fc2b2e626c9f1c842 authored almost 8 years ago
net/http: fix body close statement is missing

Call body close after ioutil.ReadAll is done

Change-Id: Ieceb1965a6a8f2dbc024e983acdfe22df17d07...

ae69a0757aa06ec9628970f688febf24690d33d5 authored almost 8 years ago
net/http: change TestServerAllowsBlockingRemoteAddr to non-parallel

It appears that this test is particularly
sensitive to resource starvation.
Returning it to non-...

afabf9ffa1e92298a2c3772e3a5e4ee02fc5eab4 authored almost 8 years ago
net/http: use httptest.Server Client in tests

After merging https://go-review.googlesource.com/c/34639/,
it was pointed out to me that a lot o...

39d6188cb2967dcbcfe9eb7790b97100daf5e355 authored almost 8 years ago
net/http: remove unused ResponseWriter params

Found by github.com/mvdan/unparam.

Change-Id: I66f5a191cf9c9a11a7c3c4d7ee0a02e2c185f019
Reviewe...

3dabce998c9938b36c567ade6ff97de5871e1754 authored almost 8 years ago
net/http/httptest: add Client and Certificate methods to Server

Adds a function for easily accessing the x509.Certificate
of a Server, if there is one. Also add...

8deafe51ddda8438f82b0a66f8bbc28b289c6d69 authored almost 8 years ago
net/http: clean up Transport.RoundTrip error handling

If I put a 10 millisecond sleep at testHookWaitResLoop, before the big
select in (*persistConn)....

6d5b9cdce8915c8ed2e40ae896dbe298003d04d5 authored almost 8 years ago
net/http: add more debugging to TestServerAllowsBlockingRemoteAddr

It fails on Solaris often, but nowhere else.

Not sure why. Add some debugging.

Change-Id: I79f...

8410d4da2dc2bc9a3aa2ade2837d58bed5adff6a authored almost 8 years ago
net/http: add support for socks5 proxy

See #18508

This commit adds http Client support for socks5 proxies.

Change-Id: Ib015f3819801da...

011cd94a81613712b3b0bdba76a9abb138dc101e authored almost 8 years ago
net/http: deflake TestClientRedirect308NoGetBody

In an unrelated CL I found a way to increase the likelihood of latent
flaky tests and found this...

4752ccd484fe2cf5457538cfc478d7f2fd04e6bd authored almost 8 years ago
net/http: fix flaky TestClientRedirect308NoLocation

This was a t.Parallel test but it was using the global DefaultTransport
via the global Get func....

02fa38f6217c0267b6e336f0e004061a62ae35f3 authored almost 8 years ago
net/http: update bundles http2

Updates http2 to x/net/http2 git rev 906cda9 for:

http2: add configurable knobs for the server'...

a96d66310a786cb3b5504843593e768ff07aac77 authored almost 8 years ago
all: fix a few typos in comments

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

7f3348ee04b10506d8d0358fb311f3a8350317aa authored almost 8 years ago
net/http: document ErrServerClosed

Fixes #19085

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

6746160ff7cb9084e2c50cc767c42fea504b7d95 authored almost 8 years ago
net/http: handle absolute paths in mapDirOpenError

The current implementation does not account for Dir being
initialized with an absolute path on s...

2fefac7f899abc93df69944d5b84c7ee5e9fda38 authored almost 8 years ago
net/http: document Response.Header values that are subordinate to other fields

I noticed that Content-Length may appear in http.Response.Header, but the docs
say it should be ...

f7f5ca6403d90f88199b2d99360d2d031dd5d6d8 authored almost 8 years ago
net/http: improve handling of errors in Dir.Open

The current implementation fails to produce an "IsNotExist" error on some
platforms (unix) for c...

72553234380b1b289aa4d3b0bfecb19426f663be authored almost 8 years ago
net/http: don't modify Request in StripPrefix

As of https://golang.org/cl/21530, rules are updated to state
that Handlers shouldn't modify the...

51c2a914d973a82052a86ecf3992e448de723b6b authored almost 8 years ago
net/http/pprof: return error when requested profile duration exceeds WriteTimeout

Updates Profile and Trace handlers to reject requests for durations >=
WriteTimeout.

Modifies g...

b90623733ea0d30974c29e0839ad6cda62182adf authored almost 8 years ago
net/http/httputil: don't log read error when it's context.Canceled

Fixes #18838

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

2d50be26b655f05b306f6cc911b8f96cba96ddd3 authored almost 8 years ago
net/http: fix dns hijacking test

The name lookups are unrooted; the test should be unrooted too.
Correctly skips the tests if the...

6090009cc96d62dc9079b68532bbb96bc263707c authored almost 8 years ago
net/http: detect Comcast et al DNS and auto-skip DNS tests

Adds helper function to auto-skip tests when DNS returns
a successful response for a domain know...

734c2027d158f7e778096c358346661708818cc7 authored almost 8 years ago
net/http: make Server validate HTTP method

Fixes #18319

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

ff685ae8f31c3e535a3d3f67c3221c82e8b17b6c authored almost 8 years ago