Преглед на файлове

fix append rawqurey to the redirect location.

Xiang Li преди 12 години
родител
ревизия
6684186033
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  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)
 }