Edinburgh Web Development

Careful with those mime types, Citrix!

Citrix mime types for gif and jpeg

by Iain Wilson

18 May 2012

Now here's a little story that may interest web developers out there.  It's to do with that old favourite - MIME types.

MIME types originally were used to define the format of email messages and attachments, but their use has extended to generally describe the format of content in many web situations.

This includes uploading files from a web page form.  The file(s) uploaded are assigned a MIME type which can be interrogated by server software.  It is not a absolute declaration of the file type, and additional methods are used to confirm its type.

Anyhow, we came across some software that was failing to carry out file uploads recently and could not figure out why initially, especially it only failed on PCs connected to a particular network.  

The network employed a 'thin client' approach and also inhibited some browser behaviour, such as right-click, for security reasons.  This client/server approach was all controlled through a Citrix environment.

After some testing, it turned out that the problem was caused by MIME types.  The Citrix online sessions produced jpg files with an image/x-citrix-pjpeg MIME type which was not being recognised as a valid MIME format by the server software and so was rejected.

Once the Citrix MIME types were included (gif one is image/x-citrix-gif) as valid formats, everything ran smoothly.

Liked this article? Please share it with your friends and colleagues.


comments powered by Disqus
 
Blot Design,
10 Colinton Road, Edinburgh, EH10 5DT,
0131 208 1792
Terms, Cookies & Privacy