Navigation Menu

Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Commit

Permalink
Replace CHECK with return failure and log.
Browse files Browse the repository at this point in the history
  • Loading branch information
crowell committed Feb 23, 2015
1 parent f4f5ac5 commit 83feaaf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ngx_pagespeed.cc
Expand Up @@ -1661,7 +1661,10 @@ ngx_int_t ps_resource_handler(ngx_http_request_t* r,
GoogleString url_string = ps_determine_url(r);
GoogleUrl url(url_string);

CHECK(url.IsWebValid());
if (!url.IsWebValid()) {
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, "invalid url");
return NGX_DECLINED;
}

scoped_ptr<RequestHeaders> request_headers(new RequestHeaders);
scoped_ptr<ResponseHeaders> response_headers(new ResponseHeaders);
Expand Down

0 comments on commit 83feaaf

Please sign in to comment.