Skip to content

Commit

Permalink
Bilibili 不支持 HEAD 请求,改回 GET 请求
Browse files Browse the repository at this point in the history
向 Bilibili 发送 HEAD 请求时会返回 400 错误,改回 GET 请求来确保兼容性。
  • Loading branch information
lfq7413 committed Feb 7, 2021
1 parent abc3c9d commit 8d513b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion request/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func Headers(url, refer string) (http.Header, error) {
headers := map[string]string{
"Referer": refer,
}
res, err := Request(http.MethodHead, url, nil, headers)
res, err := Request(http.MethodGet, url, nil, headers)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 8d513b1

Please sign in to comment.