Skip to content

Commit 60fcb1b

Browse files
committed
checks.network: use HEAD instead of GET for requests
This might be reverted at some point if partial message body content is pulled for file content type verification for distfiles, but then streaming mode should be properly set as well so all the content isn't downloaded.
1 parent 33bba4a commit 60fcb1b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/pkgcheck/checks/network.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def _http_check(self, url, *, pkg):
111111
"""Check http:// and https:// URLs using requests."""
112112
result = None
113113
try:
114-
r = self.session.get(url)
114+
r = self.session.head(url)
115115

116116
redirected_url = None
117117
for response in r.history:
@@ -138,7 +138,7 @@ def _https_available_check(self, url, *, future, orig_url, pkg):
138138
"""Check if https:// alternatives exist for http:// URLs."""
139139
result = None
140140
try:
141-
r = self.session.get(url)
141+
r = self.session.head(url)
142142

143143
redirected_url = None
144144
for response in r.history:

0 commit comments

Comments
 (0)