Parcourir la source

fix do not need to parse the original url

Xiang Li il y a 12 ans
Parent
commit
2cafdcd657
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      server/util.go

+ 1 - 1
server/util.go

@@ -20,7 +20,7 @@ func decodeJsonRequest(req *http.Request, data interface{}) error {
 }
 
 func redirect(hostname string, w http.ResponseWriter, req *http.Request) {
-	originalURL, _ := url.Parse(req.URL.String())
+	originalURL := req.URL
 	redirectURL, _ := url.Parse(hostname)
 
 	// we need the original path and raw query