wp-content is downloaded as wp-config.php.exe
-
When I click to download the wp-config.php file on my Mac, it downloads like this:
~/Downloads/wp-config.php.exeIt should be not be downloading as a Windows .exe file.
The Content-Type response header is incorrect. I changed function.php, line 101:
header("Content-type: application/x-msdownload",true,200); header("Content-Disposition: attachment; filename=". basename($path));To:
// according to RFC1521, use application/octet-stream header('Content-type: application/octet-stream', true); // wrap basename($path) in quotes in case it contains spaces header('Content-Disposition: attachment; filename="'. basename($path) . '"', true);You’ve set me as a contributor, instead of committer, so you’ll have to make the change yourself:
commit -m "Fix for : https://wordpress.org/support/topic/wp-content-is-downloaded-as-wp-configphpexe?replies=1#post-6985544..." -N /Users/jasonhendriks/projects/debug/debug/functions/function.php Sending /Users/jasonhendriks/projects/debug/debug/functions/function.php Transmitting file data ... URL access forbidden for unknown reason svn: Access to '/!svn/txr/1166293-qajp/debug/trunk/debug/functions/function.php' forbidden RA layer request failed
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘wp-content is downloaded as wp-config.php.exe’ is closed to new replies.