summaryrefslogtreecommitdiff
path: root/includes/common.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/common.inc')
-rw-r--r--includes/common.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 7b2dda038..df2b8e1d2 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -497,8 +497,8 @@ function drupal_http_request($url, $headers = array(), $method = 'GET', $data =
// user-agent is used to ensure that multiple testing sessions running at the
// same time won't interfere with each other as they would if the database
// prefix were stored statically in a file or database variable.
- if (preg_match("/^simpletest\d+/", $db_prefix)) {
- $headers['User-Agent'] = $db_prefix;
+ if (preg_match("/simpletest\d+/", $db_prefix, $matches)) {
+ $headers['User-Agent'] = $matches[0];
}
foreach ($headers as $header => $value) {