Mercurial > SimpleWebPresenter
diff common-functions.inc @ 73:947d53f95ccd
Refactor Sitemap into a separate class.
Catch all exceptions in index.php and send a 500 error if nothing else
catches it.
Check response status before submitting to sitemap.
| author | Tom Fredrik "BFG" Klaussen <bfg@blenning.no> |
|---|---|
| date | Fri, 12 Oct 2012 01:06:32 +0200 |
| parents | dd4ddedca4c5 |
| children | ff5fc61aa5ea |
line wrap: on
line diff
--- a/common-functions.inc Thu Oct 11 23:47:12 2012 +0200 +++ b/common-functions.inc Fri Oct 12 01:06:32 2012 +0200 @@ -198,7 +198,9 @@ { $response = http_head($url, array("timeout" => 1), $info); $headers = array(); + $response = trim($response); $str = explode("\n", $response); + $headers[''] = trim($str[0]); foreach($str as $kv) { $p = strpos($kv, ":"); if ($p) {
