 
     mimeType = mime.lookup filename
 
-    res.writeHead(200, { 'Content-Type': mimeType });
+    res.writeHead(200, { 'Content-Type': mimeType })
 
   if fs.existsSync filename
     return serveFile filename, res

  for i in [noExt, width, height]
    md5.update(i)

  digest = md5.digest("hex")

  filename = "#{imagePath}/#{digest}.#{ext}"

  serveFile = (filename, res)->

  # deal with extensions like:
  #   'com/LbobbpWTGJSa45Mhrb6g_y3YjLn5OthdnugrHZJQqom1eduFCnFmqdmOOZmUttP8hLg=h310'
  if ext.indexOf("com") > -1
    ext = "jpeg"

  # replace nonalphanumeric characters
  ext = ext.replace(/\W+/g, "")
