Explorar o código

change redirect code for 307 to 302 to make go http client to redirect post

Xiang Li %!s(int64=13) %!d(string=hai) anos
pai
achega
f878399992
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      handlers.go

+ 1 - 1
handlers.go

@@ -191,7 +191,7 @@ func excute(c Command, w *http.ResponseWriter, req *http.Request) {
 		url := scheme + leaderClient() + path
 		url := scheme + leaderClient() + path
 
 
 		debug("redirect to %s", url)
 		debug("redirect to %s", url)
-		http.Redirect(*w, req, url, http.StatusTemporaryRedirect)
+		http.Redirect(*w, req, url, http.StatusFound)
 		return
 		return
 	}
 	}