- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 117 for remoteaddr (0.12 sec)
-
src/net/http/httptest/httptest_test.go
want := &http.Request{ Method: "GET", Host: "example.com", URL: &url.URL{Path: "/"}, Header: http.Header{}, Proto: "HTTP/1.1", ProtoMajor: 1, ProtoMinor: 1, RemoteAddr: "192.0.2.1:1234", RequestURI: "/", } got.Body = nil // before DeepEqual want = want.WithContext(context.Background()) if !reflect.DeepEqual(got, want) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 11 18:09:14 UTC 2024 - 4.6K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/net/http_test.go
realIP string forwardedFor string remoteAddr string expected []string }{{ name: "no headers, missing remoteAddr", expected: []string{}, }, { name: "no headers, just remoteAddr host:port", remoteAddr: "1.2.3.4:555", expected: []string{"1.2.3.4"}, }, { name: "no headers, just remoteAddr host", remoteAddr: "1.2.3.4", expected: []string{"1.2.3.4"}, }, {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Apr 18 01:21:56 UTC 2023 - 24.5K bytes - Viewed (0) -
pkg/util/net/ip_test.go
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed May 01 14:41:40 UTC 2024 - 8.7K bytes - Viewed (0) -
security/pkg/server/ca/authenticate/xfcc_authenticator.go
remoteAddr := ctx.RemoteAddress() xfccHeader := ctx.Header(xfccparser.ForwardedClientCertHeader) if len(remoteAddr) == 0 || len(xfccHeader) == 0 { return nil, fmt.Errorf("caller from %s does not have Xfcc header", remoteAddr) } // First check if client is trusted client so that we can "trust" the Xfcc Header. if !isTrustedAddress(remoteAddr, features.TrustedGatewayCIDR) {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Apr 08 17:05:56 UTC 2024 - 3K bytes - Viewed (0) -
src/net/http/cgi/host.go
} if remoteIP, remotePort, err := net.SplitHostPort(req.RemoteAddr); err == nil { env = append(env, "REMOTE_ADDR="+remoteIP, "REMOTE_HOST="+remoteIP, "REMOTE_PORT="+remotePort) } else { // could not parse ip:port, let's use whole RemoteAddr and leave REMOTE_PORT undefined env = append(env, "REMOTE_ADDR="+req.RemoteAddr, "REMOTE_HOST="+req.RemoteAddr) } if hostDomain, _, err := net.SplitHostPort(req.Host); err == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 07 20:46:32 UTC 2024 - 10.4K bytes - Viewed (0) -
src/net/conn_test.go
if err != nil { t.Fatal(err) } defer c.Close() if c.LocalAddr().Network() != network || c.RemoteAddr().Network() != network { t.Fatalf("got %s->%s; want %s->%s", c.LocalAddr().Network(), c.RemoteAddr().Network(), network, network) } c.SetDeadline(time.Now().Add(someTimeout)) c.SetReadDeadline(time.Now().Add(someTimeout))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 18 17:20:52 UTC 2023 - 1.8K bytes - Viewed (0) -
src/net/file_wasip1_test.go
} else { testIsTCPAddr(t, "LocalAddr", c.LocalAddr()) testIsTCPAddr(t, "RemoteAddr", c.RemoteAddr()) } if c, ok := newFileConn(newFD("udp", -1)).(*UDPConn); !ok { t.Errorf("newFileConn: udp conn type mismatch: %T", c) } else { testIsUDPAddr(t, "LocalAddr", c.LocalAddr()) testIsUDPAddr(t, "RemoteAddr", c.RemoteAddr()) } } func testIsTCPAddr(t *testing.T, method string, addr Addr) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 13 21:06:56 UTC 2023 - 3.8K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/DelegatingSSLSocket.kt
delegate!!.bind(localAddr) } @Throws(IOException::class) override fun connect(remoteAddr: SocketAddress) { delegate!!.connect(remoteAddr) } @Throws(IOException::class) override fun connect( remoteAddr: SocketAddress, timeout: Int, ) { delegate!!.connect(remoteAddr, timeout) } override fun isInputShutdown(): Boolean { return delegate!!.isInputShutdown
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.9K bytes - Viewed (0) -
internal/handlers/proxy.go
} } return addr } // GetSourceIPRaw retrieves the IP from the request headers // and falls back to r.RemoteAddr when necessary. // however returns without bracketing. func GetSourceIPRaw(r *http.Request) string { addr := GetSourceIPFromHeaders(r) if addr == "" { addr = r.RemoteAddr } // Default to remote address if headers not set. raddr, _, _ := net.SplitHostPort(addr) if raddr == "" {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri Dec 22 00:56:55 UTC 2023 - 5.1K bytes - Viewed (0) -
src/net/protoconn_test.go
c, err := DialTCP("tcp4", nil, ra) if err != nil { t.Fatal(err) } defer c.Close() c.SetKeepAlive(false) c.SetKeepAlivePeriod(3 * time.Second) c.SetLinger(0) c.SetNoDelay(false) c.LocalAddr() c.RemoteAddr() c.SetDeadline(time.Now().Add(someTimeout)) c.SetReadDeadline(time.Now().Add(someTimeout)) c.SetWriteDeadline(time.Now().Add(someTimeout)) if _, err := c.Write([]byte("TCPCONN TEST")); err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 18 17:20:52 UTC 2023 - 7.4K bytes - Viewed (0)