mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-04 22:40:29 +03:00
Revert "Merge branch 'random-fixes' into 'master'"
This reverts merge request !605
This commit is contained in:
parent
357dea762d
commit
f6f2fb0b89
6 changed files with 8 additions and 51 deletions
|
|
@ -36,7 +36,7 @@ def download_file(url, local_filename=None, dldir='tmp'):
|
|||
return local_filename
|
||||
|
||||
|
||||
def http_get(url, etag=None, timeout=600):
|
||||
def http_get(url, etag=None):
|
||||
"""
|
||||
Downloads the content from the given URL by making a GET request.
|
||||
|
||||
|
|
@ -52,12 +52,12 @@ def http_get(url, etag=None, timeout=600):
|
|||
# TODO disable TLS Session IDs and TLS Session Tickets
|
||||
# (plain text cookie visible to anyone who can see the network traffic)
|
||||
if etag:
|
||||
r = requests.head(url, headers=headers, timeout=timeout)
|
||||
r = requests.head(url, headers=headers)
|
||||
r.raise_for_status()
|
||||
if 'ETag' in r.headers and etag == r.headers['ETag']:
|
||||
return None, etag
|
||||
|
||||
r = requests.get(url, headers=headers, timeout=timeout)
|
||||
r = requests.get(url, headers=headers)
|
||||
r.raise_for_status()
|
||||
|
||||
new_etag = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue