dont save empty responses

Former-commit-id: 7a65964715
This commit is contained in:
Leon 2017-03-21 17:47:30 +13:00
parent 3b95ebf59d
commit 149f4058fb
2 changed files with 15 additions and 11 deletions

View file

@ -124,7 +124,9 @@ class StaticHtmlOutput_UrlRequest
public function extractAllUrls($baseUrl)
{
$allUrls = array();
// TODO: will this follow urls for JS/CSS easily by adjusting?
if ($this->isHtml() && preg_match_all('/' . str_replace('/', '\/', $baseUrl) . '[^"\'#\? ]+/i', $this->_response['body'], $matches))
{
$allUrls = array_unique($matches[0]);