Explorar o código

platform: Fix legacy code

世界 %!s(int64=2) %!d(string=hai) anos
pai
achega
0a06ccae50
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      experimental/libbox/http.go

+ 3 - 0
experimental/libbox/http.go

@@ -151,6 +151,9 @@ type httpRequest struct {
 
 func (r *httpRequest) SetURL(link string) (err error) {
 	r.request.URL, err = url.Parse(link)
+	if err != nil {
+		return
+	}
 	if r.request.URL.User != nil {
 		user := r.request.URL.User.Username()
 		password, _ := r.request.URL.User.Password()