Skip to content

Commit

Permalink
fix(123): download out of memory
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Jul 21, 2022
1 parent 50fd7de commit 917ad07
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/123/driver.go
Expand Up @@ -176,14 +176,15 @@ func (driver Pan123) Link(args base.Args, account *model.Account) (*base.Link, e
return nil, err
}
u_ := fmt.Sprintf("https://%s%s", u.Host, u.Path)
res, err := base.NoRedirectClient.R().SetQueryParamsFromValues(u.Query()).Get(u_)
res, err := base.NoRedirectClient.R().SetQueryParamsFromValues(u.Query()).Head(u_)
if err != nil {
return nil, err
}
log.Debug(res.String())
link := base.Link{
Url: resp.Data.DownloadUrl,
}
log.Debugln("res code: ", res.StatusCode())
if res.StatusCode() == 302 {
link.Url = res.Header().Get("location")
}
Expand Down

0 comments on commit 917ad07

Please sign in to comment.