Merge branch 'staging/hotfix' into maintenance
# Conflicts: # .versioneer-lookup
This commit is contained in:
commit
8ea4adce56
5 files changed
+51
-15
No files matched your search
@@ -13,8 +13,8 @@ from octoprint.util.version import get_octoprint_version_string, is_released_oct
|
||||
from flask import jsonify
|
||||
from flask_babel import gettext
|
||||
|
||||
SENTRY_URL_SERVER = "https://9a2cb386ed8640e8a7fa0276f613be69@o118517.ingest.sentry.io/1373987"
|
||||
SENTRY_URL_COREUI = "https://2350156be0954d299dd07a4cef2650b2@o118517.ingest.sentry.io/1374096"
|
||||
SENTRY_URL_SERVER = "https://d479a74f172d4ac2b959a9a7d0536a82@o118517.ingest.sentry.io/1373987"
|
||||
SENTRY_URL_COREUI = "https://040577fb88b241ff985e408c11775720@o118517.ingest.sentry.io/1374096"
|
||||
|
||||
SETTINGS_DEFAULTS = dict(enabled=False,
|
||||
enabled_unreleased=False,
|
||||
|
||||
@@ -15,6 +15,7 @@ import re
|
||||
|
||||
import netifaces
|
||||
import requests
|
||||
import werkzeug.http
|
||||
|
||||
_cached_check_v6 = None
|
||||
def check_v6():
|
||||
@@ -201,9 +202,12 @@ def resolve_host(host):
|
||||
def download_file(url, folder, max_length=None):
|
||||
with requests.get(url, stream=True) as r:
|
||||
r.raise_for_status()
|
||||
|
||||
filename = None
|
||||
if "Content-Disposition" in r.headers.keys():
|
||||
filename = re.findall("filename=(.+)", r.headers["Content-Disposition"])[0]
|
||||
else:
|
||||
_, options = werkzeug.http.parse_options_header(r.headers["Content-Disposition"])
|
||||
filename = options.get('filename')
|
||||
if filename is None:
|
||||
filename = url.split("/")[-1]
|
||||
|
||||
assert len(filename) > 0
|
||||
|
||||
Reference in new issue
Block a user