ProperMIMEtyping
From oaibp
Main Page >> Data Provider Implementations
[edit] Proper MIME-typing
Server software, browsers, and the HTTP standard utilize and rely on the designation of "content types" (or MIME types) to make successful use of shared data on the Internet. For the delivery of OAI-compliant XML, the OAI Protocol requires the MIME-type setting to text/xml. Usage of any other MIME-type, such as text/plain, text/html, etc., is not acceptable.
Most out of the box OAI data provider toolkits should handle this typing automatically. Similarly, recent versions of server applications like Apache HTTP server, Apache Tomcat, JBoss, and Microsoft IIS server all automatically recognize common XML file extensions (such as .xml, .xsl, etc.) as text/xml files. For toolkits and applications that do not -- or for data providers that create their own OAI tools locally -- the MIME-type setting should be set to text/xml to ensure compliance with the protocol. Setting the MIME-type to text/xml ensures that XML and OAI-compliant tools, such as harvesters, can adequately retrieve and process the data of interest.
An easy way to see if your server is delivering XML as text/xml is to use a fifth-generation or newer browser to retrieve a given instance (i.e., performing a GetRecord request). If the data comes back in the browser looking like a plain text file, odds are the MIME-type is set to text/plain. However, if the XML has been formatted in different colors, or the data has collapsible/navigable points, it is likely being served as text/xml. Better, yet more technical, solutions include:
- Looking at the "Page Info" or "Properties" utilities provided by most browsers
- Checking your web server logs
- Viewing the HTTP header responses delivered to your web browser. The most common browsers have plug-ins or add-ons that allow you to view this data.
