# HG changeset patch # User Dan # Date 1235849890 18000 # Node ID 28d5049803f121df6391c064ce006c1c952c68b3 # Parent 0d2d0dfbe443e1b990521ee6e9d05c095a17bc85 http: minor fix to tolerate missing SERVER_SOFTWARE diff -r 0d2d0dfbe443 -r 28d5049803f1 includes/http.php --- a/includes/http.php Thu Feb 26 01:28:18 2009 -0500 +++ b/includes/http.php Sat Feb 28 14:38:10 2009 -0500 @@ -214,7 +214,8 @@ $newline = "\r\n"; $php_ver = PHP_VERSION; - $this->add_header('User-Agent', "PHP/$php_ver (Server: {$_SERVER['SERVER_SOFTWARE']}; automated bot request)"); + $server = ( isset($_SERVER['SERVER_SOFTWARE']) ) ? "Server: {$_SERVER['SERVER_SOFTWARE']}" : "CLI"; + $this->add_header('User-Agent', "PHP/$php_ver ({$server}; automated bot request)"); } /**