                 'X-Content-Type-Options' : 'nosniff'
 
               srcResp.on 'end', ->
+                decr()
                 resp.end()
 
               srcResp.on 'error', ->
+                decr()
                 resp.end()
 
               switch srcResp.statusCode

    resp.writeHead 200
    resp.end 'ok'
  else
    url = Url.parse req.url

    four_oh_four = (msg) ->
      log msg
      resp.writeHead 404, { }
      resp.write "Not Found"
      resp.end()

    transferred_headers =
      'Via'                    : process.env.CAMO_HEADER_VIA or= "Camo Asset Proxy #{version}"

EXCLUDED_HOSTS = new RegExp(excluded.replace(".", "\\.").replace("*", "\\.*"))
RESTRICTED_IPS = /^(10\.)|(127\.)|(169\.254)|(192\.168)|(172\.(1[6-9])|(2[0-9])|(3[0-1]))/

total_connections   = 0
current_connections = 0

decr = ->
  current_connections -= 1
  current_connections  = 0 if current_connections < 1

server = Http.createServer (req, resp) ->
  if req.method != 'GET' || req.url == '/'
    resp.writeHead 200
