diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-10-02 13:46:47 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-10-02 13:46:47 -0700 |
commit | 62f1bb06a21c3b07acf8005c30a5d856199d7424 (patch) | |
tree | 968afd43ec3619cac77a13a38d916b5336144c37 | |
parent | c0022dc3c35024ecfc101171bdccfc3b07227ebb (diff) |
Set the User-Agent field to "Gallery3" by default. Fixes #1408.
-rw-r--r-- | modules/gallery/helpers/MY_remote.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/gallery/helpers/MY_remote.php b/modules/gallery/helpers/MY_remote.php index 3e13ba8d..05341330 100644 --- a/modules/gallery/helpers/MY_remote.php +++ b/modules/gallery/helpers/MY_remote.php @@ -63,6 +63,9 @@ class remote extends remote_Core { * WebHelper_simple::_parseLocation logic. */ static function do_request($url, $method='GET', $headers=array(), $body='') { + if (!array_key_exists("User-Agent", $headers)) { + $headers["User-Agent"] = "Gallery3"; + } /* Convert illegal characters */ $url = str_replace(' ', '%20', $url); |