 
         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}"

                  resp.writeHead srcResp.statusCode, newHeaders

                else
                  four_oh_four(resp, "Responded with #{srcResp.statusCode}:#{srcResp.headers}")

          srcReq.on 'error', ->
            finish resp

          srcReq.end()

        else
          four_oh_four(resp, "No host found #{url.host}")
      else
        four_oh_four(resp, "checksum mismatch #{hmac_digest}:#{query_digest}")
    else
      four_oh_four(resp, "No pathname provided on the server")

console.log "SSL-Proxy running on #{port} with pid:#{process.pid}."
console.log "Using the secret key #{shared_key}"
