Browse Source

fix do not need to parse the original url

Xiang Li 12 năm trước cách đây
mục cha
commit
2cafdcd657
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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) {
 func redirect(hostname string, w http.ResponseWriter, req *http.Request) {
-	originalURL, _ := url.Parse(req.URL.String())
+	originalURL := req.URL
 	redirectURL, _ := url.Parse(hostname)
 	redirectURL, _ := url.Parse(hostname)
 
 
 	// we need the original path and raw query
 	// we need the original path and raw query