Skip to content
Snippets Groups Projects

Use 307 redirects

Open ale requested to merge redirect-307 into master
2 files
+ 8
8
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 4
4
@@ -46,8 +46,8 @@ func makeAuthRequest(t testing.TB, c *http.Client, base, path, service, domain s
if err != nil {
t.Fatalf("Get(%s): %v", path, err)
}
if resp.StatusCode != http.StatusFound {
t.Fatalf("Get(%s) expected 302, got %d", path, resp.StatusCode)
if resp.StatusCode != http.StatusTemporaryRedirect {
t.Fatalf("Get(%s) expected 307, got %d", path, resp.StatusCode)
}
loc, err := url.Parse(resp.Header.Get("Location"))
if err != nil {
@@ -78,8 +78,8 @@ func makeAuthRequest(t testing.TB, c *http.Client, base, path, service, domain s
if err != nil {
t.Fatal("Get(/sso_login):", err)
}
if resp.StatusCode != http.StatusFound {
t.Fatalf("Get(/sso_login) expected 302, got %d", resp.StatusCode)
if resp.StatusCode != http.StatusTemporaryRedirect {
t.Fatalf("Get(/sso_login) expected 307, got %d", resp.StatusCode)
}
resp.Body.Close()
if s := resp.Header.Get("Location"); s != destURL {
Loading