Without this checking, we will run into a TIMEOUT request because
http_redirect_fetch will return immediately when location doesn't exist.