Skip to content

Commit

Permalink
fix(123): incorrect download url (close #3385)
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Feb 14, 2023
1 parent ae04a0a commit 2ca3e0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/123/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ func (d *Pan123) Link(ctx context.Context, file model.Obj, args model.LinkArgs)
return nil, err
}
}
u_ := fmt.Sprintf("https://%s%s", u.Host, u.Path)
u_ := u.String()
res, err := base.NoRedirectClient.R().SetQueryParamsFromValues(u.Query()).Head(u_)
if err != nil {
return nil, err
}
log.Debug(res.String())
link := model.Link{
URL: downloadUrl,
URL: u_,
}
log.Debugln("res code: ", res.StatusCode())
if res.StatusCode() == 302 {
Expand Down

0 comments on commit 2ca3e0b

Please sign in to comment.