CPDL Webmaster: please send correct Content-Type

Forum for all users to discuss the implementation and operation of the ChoralWiki at CPDL
Post Reply
rdhw
Posts: 3
Joined: 04 Aug 2011 15:36

CPDL Webmaster: please send correct Content-Type

Post 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
choralia
Site Admin
Posts: 2926
Joined: 05 Mar 2006 19:57
Location: Rome, Italy
Contact:

Re: CPDL Webmaster: please send correct Content-Type

Post 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
choralia
Site Admin
Posts: 2926
Joined: 05 Mar 2006 19:57
Location: Rome, Italy
Contact:

Re: CPDL Webmaster: please send correct Content-Type

Post 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
rdhw
Posts: 3
Joined: 04 Aug 2011 15:36

Re: CPDL Webmaster: please send correct Content-Type

Post by rdhw »

That's fixed it on www, thanks!
choralia
Site Admin
Posts: 2926
Joined: 05 Mar 2006 19:57
Location: Rome, Italy
Contact:

Re: CPDL Webmaster: please send correct Content-Type

Post by choralia »

Thank you, I've propagated the same setting to all servers now.

Max
carlos
Site Admin
Posts: 1870
Joined: 19 Aug 2008 15:26
Location: São Paulo, Brasil

Re: CPDL Webmaster: please send correct Content-Type

Post 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.
Post Reply