platform: Fix legacy code

This commit is contained in:
世界 2023-11-07 22:14:15 +08:00
parent 8de0fad9f5
commit 0a06ccae50
No known key found for this signature in database
GPG key ID: CD109927C34A63C4

View file

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