Page 1 of 1
CPDL Webmaster: please send correct Content-Type
Posted: 04 Aug 2011 15:55
by rdhw
Please could this web site's server be reconfigured to send more appropriate Content-Type HTTP headers for score downloads etc. At present it is sending:
Content-Type: text/plain
which leads to all sorts of download problems with client browsers. A possible safe default setting for any binary file format would be:
Content-Type: application/octet-stream
but of course you could send specific MIME types for certain file types where assigned, such as:
.pdf -> application/pdf
.sib -> application/x-sibelius-score
Re: CPDL Webmaster: please send correct Content-Type
Posted: 05 Aug 2011 14:14
by choralia
Could you please specify an example of file where incorrect content-type headers are produced? For example, I've just downloaded this file:
http://www3.cpdl.org/wiki/images/f/f1/A ... e_Jesu.pdf
and apparently an application/pdf header was correctly sent to my browser.
Please specify the whole path including the initial part (www, www1, www2, www3, choralwiki), as they are all different servers and we may need to trace a misconfiguration of the specific server.
Max
Re: CPDL Webmaster: please send correct Content-Type
Posted: 05 Aug 2011 16:38
by rdhw
Re: CPDL Webmaster: please send correct Content-Type
Posted: 06 Aug 2011 16:40
by choralia
Our servers are shared with other websites, to save hosting costs. Apparently, such servers are set to use Content-Type: text/plain as a default for MIME types that are not explicitly configured. I've now set the default type as application/octet-stream on the www server only through a specific .htaccess directive. Could you please check that .sib, .cap, and .enc files are now rendered using Content-Type: application/octet-stream in the http header? I'm currently on vacation in a quite remote area with rather limited internet connectivity, so I cannot perform all checks that I could normally carry out. If it works fine on the www server, I'll set the same directive on the other servers.
A specific setting would be required for .mus files in order to override the explicit application/vnd.musician setting.
Max
Re: CPDL Webmaster: please send correct Content-Type
Posted: 06 Aug 2011 20:06
by rdhw
That's fixed it on www, thanks!
Re: CPDL Webmaster: please send correct Content-Type
Posted: 07 Aug 2011 14:32
by choralia
Thank you, I've propagated the same setting to all servers now.
Max
Re: CPDL Webmaster: please send correct Content-Type
Posted: 07 Aug 2011 14:42
by carlos
Hi rdhw,
This is strange, because apparently the wiki platform is identifying these files correctly, as can be checked in these examples taken from the ones you listed:
MIME type: application/x-sibelius-score:
http://www.cpdl.org/wiki/index.php/File ... Drowsy.sib
MIME type: application/x-capella-music-notation:
http://www.cpdl.org/wiki/index.php/File ... planet.cap
MIME type: application/x-encore-music-notation:
http://www.cpdl.org/wiki/index.php/File ... zep(D).enc
This must be a server-related configuration, as Max pointed out. For some reason the server is not using the MIME type specified by the wiki software.