How to let webmail show html part of an email?

I send an email which has a text mime part and a html mime part. When I receive the email using a client app such as Windows Mail, the html version of the email is shown in the client, which is good. However, if I login to webmail(such as outlook.com) to see the email, only … Read more

Mapping new file type to IIS and 404 before passing off the request

I’m mapping new file types in IIS 6 to the ASP.NET processor; for example the .gif image type. IIS will see a GIF image doesn’t not exist (e.g. http://www.example.com/NoExist.GIF ) and raise a 404 HTTP err before passing the request onto ASP.NET. I want to turn off the IIS file check so ASP.NET gets to … Read more

file utility on linux does not give MIME type for certain m4v files

We’re using the file utility on linux to determine the file MIME type (and this information we subsequently use), which seems to be failing on some m4v files, but not on others. Running Shows /usr/bin/file sample_iPod.m4v sample_iPod.m4v: ISO Media /usr/bin/file -i -b sample_iPod.m4v (NOTHING) This particular file was from Apple’s site: http://support.apple.com/kb/HT1425 The ones for … Read more

Lighttpd doesn’t read mime-type from files without an extension

I have a folder with images that I need to be lightweight hosted. So I decided to go for lighttpd. So I read that I had to add the following option in the config file: mimetype.use-xattr = “enable” It didn’t work, when loading an image it was sended with an application/octet-stream file type header, and … Read more

IIS7 403 for custom mime type

I have added in a custom mime type (epub) as “application/epub” into IIS7. This was working originally but something seems to have stopped it working and now we get the response “403 Forbidden: body content-type denied”. This is a strange message, and google brings up very few results, none of them seem relevant. Any ideas? … Read more

xdg-mime returns “xprop: unable to open display ” “

I’m attempting to track down a problem with a particular CSS file being returned as text/html instead of text/css. file -mime install.css returns some less useful info: install.css: text/x-c; charset=us-ascii So I was encouraged to use xdg-mime instead: [box]# xdg-mime query filetype install.css xprop: unable to open display ” usage: xprop [-options …] [[format [dformat]] … Read more

Enable gzip for source maps

I’m using the Grunt plugins to concat, minify and generate source maps of my Javascript before I push it to the production server (I’ll soon be doing the same with SASS for CSS). The source maps generated are plain text but with an file ‘extension’ of .map (e.g. plugins.js.map). Apparently, they aren’t being gzipped. I’m … Read more

NGINX downloads text file instead of displaying it

I have Nginx installed with the following nginx.conf: user nginx; worker_processes 1; error_log /var/log/nginx/error.log; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; log_format main ‘$remote_addr – $remote_user [$time_local] “$request” ‘ ‘$status $body_bytes_sent “$http_referer” ‘ ‘”$http_user_agent” “$http_x_forwarded_for”‘; access_log /vagrant/access.log main; sendfile on; keepalive_timeout 65; include /etc/nginx/conf.d/*.conf; } Everytime I tried the URL of … Read more