[OH-Dev] [issue667] Safari appends ".txt" to tutorial's python script's name
alx
bugs at openhatch.org
Sat Feb 4 21:45:30 UTC 2012
New submission from alx <alx-openhatch at unsealed.net>:
On:
http://openhatch.org/wiki/Boston_Python_Workshop_5/Friday/Tutorial#Pyth
on_scripts
when a Mac OS 10.7 Safari user clicks on
http://mit.edu/jesstess/www/BostonPythonWorkshop5/nobel.py
The file is opened in the browser. When right-clicked and "Saved As...",
the file is renamed from "nobel.py" to "nobel.py.txt".
Later in step 4 ( CLI: "python nobel.py" ), the filename doesn't match,
and a student was observed to be visibly confused.
I think this might be a server side issue over at the mit.edu server
where the script is stored, which is running Apache. So, this might be
fixable with a custom .htaccess file in
http://mit.edu/jesstess/www/BostonPythonWorkshop5/
I think this has to do with "Content-Disposition".
Another solution might be to move the file to openhatch.org (for example
to "/var/www/BostonPythonWorkshop5/pyfiles/"), where you have the
liberty of configuring nginx.conf with per-directory custom Content-
Disposition header:
location /files/BostonPythonWorkshop5/ {
root /var/www/BostonPythonWorkshop5/pyfiles/;
add_header Content-Disposition 'attachment;
}
Or something like that. Hope this helps!
----------
messages: 2936
nosy: alx, paulproteus
priority: bug
status: unread
title: Safari appends ".txt" to tutorial's python script's name
__________________________________________
Roundup issue tracker <bugs at openhatch.org>
<https://openhatch.org/bugs/issue667>
__________________________________________
More information about the Devel
mailing list