Hard Light Productions Forums
Site Management => Site Support / Feedback => Topic started by: z64555 on November 22, 2011, 01:01:00 pm
-
It seems more and more people have been having problems downloading attachments... in most cases they download as a .php instead.
Any idea what may be causing this?
I know that a few days back I tried a download in FireFox, but it kept trying to give me a .php. I went to IE7 and it worked just fine.
Seems one solution is to try renaming the downloaded .php file to whatever type it should be, i.e. renaming it to a .rar.
-
It appears it is a bug in SMF (http://dev.simplemachines.org/mantis/view.php?id=4825). It seems SMF sends a modified Content-Disposition header to Firefox browsers that is incorrect (https://bugzilla.mozilla.org/show_bug.cgi?id=685060) (ie., not supported by the RFCs). Older versions of Firefox (https://bugzilla.mozilla.org/show_bug.cgi?id=651185) are not affected because they allowed the incorrect syntax, but starting with FF8 the bug has been fixed which means FF8 users get a bad header that FF will ignore resulting in FF using the name of the file in the url (index.php) rather than the files name as sent by the server.
It appears the correct fix for this issue is to update SMF so that it doesn't sniff the user agent when setting this header, though it doesn't appear that SMF has actually made this fix available in the most recent version. However, it seems there is a patch available (http://www.simplemachines.org/community/index.php?topic=454734.msg3204632#msg3204632) to fix this problem before the SMF releases a new version.
In the mean time, I have install an addon (https://addons.mozilla.org/en-US/firefox/addon/user-agent-rg/) that changed my user agent to Chrome 11 so SMF doesn't send me the unsupported header.
-
I just ported the fix as outlined, so let's see what happens.
You may need to do a force-refresh load of HLP first.
***Edit: Disregard previous edit, it should be all good now, despite a slight hiccup.
-
It doesn't appear to have changed anything for me. Checking in wireshark it looks like I am still getting different content-disposition headers based on my user agent. I will try it in the morning to see if its not Cloudflare caching the response (because the cache control headers are set to vary on user-agent (even though a file download is supposed to be a private cache only).
Attaching test attachment.
EDIT: still broken using FF8's default user agent.
[attachment deleted by a basterd]
-
FF8 here and that attachment looks like a php file to me.
Yep sorry, it no worky.
-
Well, I don't know what to say about that then, other than that the purported fix probably really isn't, but I'll keep an eye on the SMF boards for it.
But at least the "change" (when done properly) doesn't seem to have broken anything. (I'm on Pre-8 on my main machine, so things still look fine)
-
Well I mean it looks to be a 7z file when you look at the post listing, but when you go to download it it comes up as a index.php.
Not sure if that helps any or not...
-
I just downloaded the shaders you just posted and it worked as it should.
-
rscaper1070: That's because those are a post inline link, not a post attachment.
Like I said, I'll keep up on the issue and I have FF8 on another machine, I'll try to work out some sort of a fix on a split copy of the forums and then migrate the actual working fix soon.
-
Okay. Looking at the SMF bug number 4825 (http://dev.simplemachines.org/mantis/view.php?id=4825), it has a new patch attached, apparently it fixes it without introducing more bugs (with respect to spaces in the file names).
They have several threads on this on the SMF forum. They seem to have just fixed it there, I have asked SleePy (http://www.simplemachines.org/community/index.php?topic=451766.msg3217487#msg3217487) which fix he actually used.
-
Okay, so, in theory, this should now be fixed.
[attachment deleted by a basterd]
-
Text received, test successful.
-
Worked for me.
-
Okay, so, in theory, this should now be fixed.
Works for me, too. :yes:
Thanks, everyone!
-
Was this full forum upgrade or partial upgrade to fix only this specific issue? Version number would indicate full upgrade, which I hope is the case due to security issues older versions had.
-
Oh, I just hacked the display for the version number.
...
...
Or maybe I'm just joking and we actually did get around to doing the upgrade AND implementing the attachment fix.
Who knows.