pyhton3 flask hangs on file changes using send_from_directory
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
flask (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I was getting an exception randomly on minetest master-server that I traced back to "send_from_
Similar Error
https:/
Bug Fix:
https:/
Please update the package with bug fix reported above.
Thank you!
Summary of issue from a user on GitHub:
welshjf commented on May 1
I've hit this problem too; perhaps I can clarify what's going on.
send_from_directory tests for existence based on the safe_join of directory and filename. So if directory is relative, this is relative to the current working directory of the process -- pretty unreliable. send_file, however, expands relative paths based on current_
Thus, if the CWD and root_path do not match, send_from_directory may prematurely raise a 404 for files that do exist, or fail to do so for files that happen to exist in the CWD but not the root_path. In the second case, you get a 500 internal error when os.path.getsize or
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: python3-flask (not installed)
ProcVersionSign
Uname: Linux 3.19.0-25-generic i686
ApportVersion: 2.14.1-0ubuntu3.19
Architecture: i386
Date: Mon Dec 21 10:20:51 2015
InstallationDate: Installed on 2015-12-09 (12 days ago)
InstallationMedia: Ubuntu-Server 14.04.3 LTS "Trusty Tahr" - Beta i386 (20150805)
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: flask
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in flask (Ubuntu): | |
status: | New → Fix Released |