Header decomposition error in PDF,

Header decomposition error in PDF,

by Zack Mack -
Number of replies: 7

Hi,

We are using Moodle version 2.3.6. We have uploaded PDFs in an course as an activity however whenever we tried to download/open it gaves this error message in Chrome :

"

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.

"

In Firefox we got some other error as :

"

Corrupted Content Error
 
        The page you are trying to view cannot be shown because an error in the data transmission was detected.Please contact the website owners to inform them of this problem.

"

But in IE,  it is working fine.

 

Can anyone pls help us out to resolve this issue.

Thanks

Average of ratings: -
In reply to Zack Mack

Re: Header decomposition error in PDF,

by Zack Mack -

Anyone Please help me to sort this out..

In reply to Zack Mack

Re: Header decomposition error in PDF,

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Zack,
never seen before, you could inspect your HTTP Response Headers using Fiddler, in case you have Windows as client - install it, press F12, download one of your PDF -, or just use the Dev Tools provided by your preferred modern browser - again F12 to show them - and report back here these HTTP Response Headers.

HTH,
Matteo

In reply to Matteo Scaramuccia

Re: Header decomposition error in PDF,

by Zack Mack -

Hi Matteo,

This is the first time also i am facing this issue in Moodle, I installed Fiddler and tried to download my PDF from Moodle, below are the Raw headers i got from that URL :

HTTP/1.1 200 OK
Date: Tue, 18 Jun 2013 21:12:24 GMT
Server: Apache
X-Powered-By: PHP/5.3.3
Expires: Wed, 19 Jun 2013 21:12:25 GMT
Cache-Control: max-age=86400
Pragma:
Content-Disposition: inline; filename="TEST.pdf"
Last-Modified: Wed, 12 Jun 2013 15:32:33 GMT
ETag: 837aed65294309db57b690ba4ee16e6979dd896b
Accept-Ranges: bytes
Vary: Accept-Encoding,User-Agent
Content-Encoding: gzip
Content-Disposition: attachment
Keep-Alive: timeout=15, max=99
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: application/pdf

 

Is it what you are looking for ? If you need any information please let me know.

Thanks

 

 

In reply to Zack Mack

Re: Header decomposition error in PDF,

by Zack Mack -

Also, when i googled initially about this error, i got these links but didn't help :

https://moodle.org/mod/forum/discuss.php?d=201781

https://tracker.moodle.org/browse/MDL-32889

http://stackoverflow.com/questions/8588818/chrome-pdf-display-duplicate-headers-received-from-the-server

http://stackoverflow.com/questions/5843010/sending-pdf-as-attachment-causes-undefined-error-in-chrome-browser

Tried taking example last 2 urls above, tried to find download/open code in Moodle files but didn't able to find, seems like it is using some other methods to open/download the files,

Please Advice.

Thanks

 

 

 

In reply to Zack Mack

Re: Header decomposition error in PDF,

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Zack,
that's the required information, well done!
The issue could be that you have two Content-Disposition headers saying the opposite and the gzip option makes me thinking about something in between Moodle code and your browser.

Do you use mod_header or something similar used to change some of the Moodle headers?

Matteo

In reply to Matteo Scaramuccia

Re: Header decomposition error in PDF,

by Zack Mack -

Sorry for delayed reply,

Is mod_headers is required for Moodle ? If i disable mod_headers from my Apache set up it gives me INTERNAL SERVER ERROR, so that means  Moodle requires Mod_headers, may be on my server ?

Pls help me to sort this error.

Thanks