summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/MY_remote.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-10-02 13:46:47 -0700
committerBharat Mediratta <bharat@menalto.com>2010-10-02 13:46:47 -0700
commit62f1bb06a21c3b07acf8005c30a5d856199d7424 (patch)
tree968afd43ec3619cac77a13a38d916b5336144c37 /modules/gallery/helpers/MY_remote.php
parentc0022dc3c35024ecfc101171bdccfc3b07227ebb (diff)
Set the User-Agent field to "Gallery3" by default. Fixes #1408.
Diffstat (limited to 'modules/gallery/helpers/MY_remote.php')
-rw-r--r--modules/gallery/helpers/MY_remote.php3
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);