 
     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)->

module.exports = (req, res) ->
  {endpoint, grow, width, height, url} = req.query

  fullUrl = "https://i.embed.ly/1/display/#{endpoint}?" +
             "width=#{width}&" +
             "height=#{height}&" +
             "key=#{apiKey}&" +
             "url=#{encodeURIComponent(url)}"

  url   = parser.parse url
  ext   = url.pathname.split(".")[-1] or "jpeg"
  noExt = "#{url.host}#{url.pathname}"

  # arbitary limit to prevent ENAMETOOLONG errors
  if ext.length > 20
