- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for ErrNoLocation (0.26 sec)
-
src/net/http/response.go
return readSetCookies(r.Header) } // ErrNoLocation is returned by the [Response.Location] method // when no Location header is present. var ErrNoLocation = errors.New("http: no Location header in response") // Location returns the URL of the response's "Location" header, // if present. Relative redirects are resolved relative to // [Response.Request]. [ErrNoLocation] is returned if no // Location header is present.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 10 03:29:50 UTC 2024 - 11.1K bytes - Viewed (0) -
src/net/http/response_test.go
} var responseLocationTests = []responseLocationTest{ {"/foo", "http://bar.com/baz", "http://bar.com/foo", nil}, {"http://foo.com/", "http://bar.com/baz", "http://foo.com/", nil}, {"", "http://bar.com/baz", "", ErrNoLocation}, {"/bar", "", "/bar", nil}, } func TestLocationResponse(t *testing.T) { for i, tt := range responseLocationTests { res := new(Response) res.Header = make(Header)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 08 19:01:29 UTC 2024 - 23.6K bytes - Viewed (0)