 
     else
       next()
-  +  

      this.failWithError(err)

  doFetch: (urlString) ->
    http.get(url.parse(urlString), (imageResponse) =>
      try
        if imageResponse.statusCode == 200
          this.processImage(imageResponse, urlString)

      console.log("[ERR] error fetching image: #{err.message}")
      this.failWithError(err)

    ).on('close', =>
      console.log("[ERR] connection closed")
      this.fail(500, 'Connection closed')

    ).on('socket', (socket) =>
      socket.setTimeout(@ns.timeout) if @ns.timeout?
    )

