 
         if url.host? && !url.host.match(RESTRICTED_IPS)
           if url.host.match(EXCLUDED_HOSTS)
-            return four_oh_four("Hitting excluded hostnames")
+            return four_oh_four(resp, "Hitting excluded hostnames")
 
           src = Http.createClient url.port || 80, url.hostname
 
           src.on 'error', (error) ->
-            four_oh_four("Client Request error #{error.stack}")
+            four_oh_four(resp, "Client Request error #{error.stack}")
 
           query_path = url.pathname
           if url.query?

    total_connections   += 1
    current_connections += 1
    url = Url.parse req.url

    four_oh_four = (msg) ->
      decr()
      log msg
      resp.writeHead 404
      resp.end "Not Found"

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

total_connections   = 0
current_connections = 0

four_oh_four = (resp, msg) ->
  log msg
  resp.writeHead 404
  finish resp, "Not Found"

finish = (resp, str) ->
  current_connections -= 1
  current_connections  = 0 if current_connections < 1
  resp.end str

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