Commit Graph

7 Commits

Author SHA1 Message Date
kmahapatra 2f55fe00c5
Fix potential slowloris attack (#2682) 2023-02-15 23:47:51 +00:00
Dave Protasowski 44d1d7d978
Go1.19 changes (#2631)
* run goimports

* ignore linter errors for now

* fix boilerplate
2022-11-03 22:34:05 +00:00
Kenjiro Nakayama ca82d2bbb2
Add `NewProxyAutoTLSTransport` and `DialTLSWithBackOff` to support TLS proxy (#2479)
* Add `NewProxyAutoTLSTransport` and `DialTLSWithBackOff` to support TLS proxy

Part of: https://github.com/knative/serving/issues/12503
PoC: https://github.com/knative/serving/pull/12815

This patch `NewProxyAutoTLSTransport` which is `NewProxyAutoTransport + TLS config.
Current proxy does not support TLS but it needs for https://github.com/knative/serving/issues/12503.

`DialTLSWithBackOff` is also `DialWithBackOff` + TLS config. It needs
`newH2Transport` which handles HTTP2 with TLS.

* Fix lint

* Fix review comments
2022-04-11 05:32:20 +00:00
Julian Friedman 6045ed4996
Allow setting DisableCompression in NewAutoTransport (#2007)
Go's http client helpfully adds an "Accept-Encoding: gzip" header if not
already present, and unzips the response if it did so. While this is
often the right thing to do, it is not the right thing to do if we're
reverse proxying since (a) it means we add a header to the request the
client didn't actually ask for (b) it means we end up uncompressing
things in the proxy, which e.g. for activator/QP is not what we want.
2021-02-03 09:17:06 -08:00
Victor Agababov 0fccc54273
Use the same dial with backoff for H2C as we do for HTTP/1.1 (#1915)
Also remove the constant that is not used anywhere.
2020-11-17 14:14:52 -08:00
Markus Thömmes 1b903ad8cc
Fix malformed license headers. (#1258) 2020-04-29 08:38:42 -07:00
Victor Agababov 37bd04dc3e Move generic packages from serving to pkg. (#927)
* Move generic packages from serving to pkg.

I was asked to move this to do some re-use in Eventing.

/cc @chizh
/assign mattmoor @tcnghia

* fix the compile error
2019-12-06 17:57:40 -08:00