Browse Source

fix append rawqurey to the redirect location.

Xiang Li 12 years ago
parent
commit
6684186033
1 changed files with 2 additions and 1 deletions
  1. 2 1
      server/util.go

+ 2 - 1
server/util.go

@@ -20,7 +20,8 @@ func decodeJsonRequest(req *http.Request, data interface{}) error {
 
 func redirect(hostname string, w http.ResponseWriter, req *http.Request) {
 	path := req.URL.Path
-	url := hostname + path
+	query := req.URL.RawQuery
+	url := hostname + path + "?" + query
 	log.Debugf("Redirect to %s", url)
 	http.Redirect(w, req, url, http.StatusTemporaryRedirect)
 }