Permalink
Browse files

Replace CHECK with return failure and log.

  • Loading branch information...
crowell committed Jan 30, 2015
1 parent 90ac91f commit 9da85bb9d5a4a11ca082628edb4f0c6635497364
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/ngx_pagespeed.cc
@@ -1816,7 +1816,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);

0 comments on commit 9da85bb

Please sign in to comment.