Skip to content

Commit

Permalink
feat: 检查网址时允许重定向 (#162)
Browse files Browse the repository at this point in the history
feat: 检查网址的时候允许重定向
  • Loading branch information
he0119 authored Aug 7, 2023
1 parent 7ecdd0e commit 2523ad4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/lang/zh-CN/
### Changed

- 统一称呼将 PyPI 项目与包区分开来
- 检查网址的时候允许重定向

## [2.7.2] - 2023-07-08

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/publish/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ def check_url(url: str) -> int | None:
"""
logger.info(f"检查网址 {url}")
try:
r = httpx.get(url)
r = httpx.get(url, follow_redirects=True)
return r.status_code
except:
pass
Expand Down

0 comments on commit 2523ad4

Please sign in to comment.