mirror of
https://github.com/caddyserver/caddy.git
synced 2025-06-19 21:41:24 +08:00
mitm, templates, context: Pool buffers to reduce allocations
Also disable some tests on context.Hostname because they're not portable
This commit is contained in:
@ -251,14 +251,16 @@ func TestHostname(t *testing.T) {
|
||||
inputRemoteAddr string
|
||||
expectedHostname string
|
||||
}{
|
||||
// TODO(mholt): Fix these tests, they're not portable. i.e. my resolver
|
||||
// returns "fwdr-8.fwdr-8.fwdr-8.fwdr-8." instead of these google ones.
|
||||
// Test 0 - ipv4 with port
|
||||
{"8.8.8.8:1111", "google-public-dns-a.google.com."},
|
||||
// Test 1 - ipv4 without port
|
||||
{"8.8.8.8", "google-public-dns-a.google.com."},
|
||||
// Test 2 - ipv6 with port
|
||||
{"[2001:4860:4860::8888]:11", "google-public-dns-a.google.com."},
|
||||
// Test 3 - ipv6 without port and brackets
|
||||
{"2001:4860:4860::8888", "google-public-dns-a.google.com."},
|
||||
// {"8.8.8.8:1111", "google-public-dns-a.google.com."},
|
||||
// // Test 1 - ipv4 without port
|
||||
// {"8.8.8.8", "google-public-dns-a.google.com."},
|
||||
// // Test 2 - ipv6 with port
|
||||
// {"[2001:4860:4860::8888]:11", "google-public-dns-a.google.com."},
|
||||
// // Test 3 - ipv6 without port and brackets
|
||||
// {"2001:4860:4860::8888", "google-public-dns-a.google.com."},
|
||||
// Test 4 - no hostname available
|
||||
{"1.1.1.1", "1.1.1.1"},
|
||||
}
|
||||
|
Reference in New Issue
Block a user