- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for setCookies (0.16 sec)
-
src/net/http/client_test.go
} var echoCookiesRedirectHandler = HandlerFunc(func(w ResponseWriter, r *Request) { for _, cookie := range r.Cookies() { SetCookie(w, cookie) } if r.URL.Path == "/" { SetCookie(w, expectedCookies[1]) Redirect(w, r, "/second", StatusMovedPermanently) } else { SetCookie(w, expectedCookies[2]) w.Write([]byte("hello")) } }) func TestClientSendsCookieFromJar(t *testing.T) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 21:30:50 UTC 2024 - 63.8K bytes - Viewed (0) -
src/net/http/httputil/reverseproxy_test.go
} if g, e := len(res.Header["X-Multi-Value"]), 2; g != e { t.Errorf("got %d X-Multi-Value header values; expected %d", g, e) } if g, e := len(res.Header["Set-Cookie"]), 1; g != e { t.Fatalf("got %d SetCookies, want %d", g, e) } if g, e := res.Trailer, (http.Header{"X-Trailer": nil}); !reflect.DeepEqual(g, e) { t.Errorf("before reading body, Trailer = %#v; want %#v", g, e) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 54.6K bytes - Viewed (0)