Page 1 of 2

Weird error when Downloading a rom

PostPosted: Sun Jun 10, 2012 10:17 am
by punkydudester
When I try to download The Crow for the Sega Saturn - this is the error I get below:

Duplicate headers received from server
The response from the server contained duplicate headers. This problem is generally the result of a misconfigured website or proxy. Only the website or proxy administrator can fix this issue.
Error 349 (net::ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION): Multiple distinct Content-Disposition headers received. This is disallowed to protect against HTTP response splitting attacks.

Re: Weird error when Downloading a rom

PostPosted: Sun Jun 10, 2012 10:27 am
by te_lanus
Yip. I can confirm this one. No problem with the rest I tried

Re: Weird error when Downloading a rom

PostPosted: Mon Jun 11, 2012 1:02 pm
by Hot Trout
Not a problem, I have uploaded the rom again and hopefully now it will work. I can confirm that it works locally for me with no problems.

Re: Weird error when Downloading a rom

PostPosted: Wed Aug 08, 2012 12:47 pm
by punkydudester
I have come accross a few more in the Sega Saturn Roms: Horde, House of the Dead, & Incredible Hulk. Also The Crow is still getting the same error. :? What else could be causing this error? :freakout: I have not had this from the rest of the rom sections. :problem:

Re: Weird error when Downloading a rom

PostPosted: Wed Aug 29, 2012 3:42 pm
by void*
Hi,

I recently have the same problem but only with Google Chrome. It worked fine with Mozilla Firefox. Which browser are you guys using? Have you tried using another browser?

During my research why this problem only occures with Chrome I found out that each rom I couldn't download had a comma in the filename which seems to cause this problem.

Re: Weird error when Downloading a rom

PostPosted: Fri Aug 31, 2012 9:00 am
by Kherr
You know what, that's a very good point. Something about those commas. HT, didn't you say that breaks the links on here?

Re: Weird error when Downloading a rom

PostPosted: Fri Aug 31, 2012 9:02 am
by Hot Trout
Unfortunately some of the many thousands of roms available on here have got commas, quotes, ampersands etc and sometimes browsers see these incorrectly. I have made as many amendments to the htaccess file as is possible to help this.

Re: Weird error when Downloading a rom

PostPosted: Tue Sep 04, 2012 10:41 pm
by void*
Well the problem is only caused by the comma. I tested it with some roms that contain quotes, etc. It worked fine with all of them. According to RFC1806 the content-dispositon header can contain every US-ASCII character. This would include the comma too.

I do not want to analyse the header that is sent when the download should be started but HT did you try to put the filename in double quotes (e.g. "game,xyz.zip")? This can probably solve the problem. For more detail you can also read RFC2231.

Re: Weird error when Downloading a rom

PostPosted: Sat Sep 15, 2012 1:23 pm
by PMJPlay
Well I have done some testing and it seems to be only Google Chrome that has problems downloading roms off the site. So for now I recommend using Firefox, Opera and IE if you are having problems downloading roms :D

Re: Weird error when Downloading a rom

PostPosted: Sat Dec 29, 2012 4:14 am
by rckclmbr
Here's an example url: http://www.theoldcomputer.com/roms/down ... VzLnppcA==

It's heavily reproducible in Chrome. The fix is pretty easy, provided you have access to the codebase. The problem HTTP header is this:

Content-Disposition: attachment; filename=Legend_of_Zelda,_The_-_Special_Edition_(Zelda_Hack).nes.zip

It should look like this (note the added quotes):

Content-Disposition: attachment; filename="Legend_of_Zelda,_The_-_Special_Edition_(Zelda_Hack).nes.zip"

So the code should look something like this:

add_header("Content-Disposition", "attachment; filename=\"" + $filename + "\"");