Skip to content

Commit 4b313b6

Browse files
author
Jippe Holwerda
committed
Separate user agent strings for curl and fopen.
1 parent 95640e0 commit 4b313b6

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/class-tiny-compress-curl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ protected function shrink_options($input) {
2929
CURLOPT_HEADER => true,
3030
CURLOPT_CAINFO => self::get_ca_file(),
3131
CURLOPT_SSL_VERIFYPEER => true,
32-
CURLOPT_USERAGENT => Tiny_WP_Base::plugin_identification()
32+
CURLOPT_USERAGENT => Tiny_WP_Base::plugin_identification() . ' cURL'
3333
);
3434
}
3535

src/class-tiny-compress-fopen.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ protected function shrink_options($input) {
2626
'header' => array(
2727
'Content-type: image/png',
2828
'Authorization: Basic ' . base64_encode('api:' . $this->api_key),
29-
'User-Agent: ' . Tiny_WP_Base::plugin_identification(),
29+
'User-Agent: ' . Tiny_WP_Base::plugin_identification() . ' fopen',
3030
),
3131
'content' => $input
3232
),

src/class-tiny-wp-base.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public static function plugin_version() {
2727
}
2828

2929
public static function plugin_identification() {
30-
return 'Wordpress/' . $GLOBALS['wp_version'] . ' Tiny/' . self::plugin_version() . ' cURL';
30+
return 'Wordpress/' . $GLOBALS['wp_version'] . ' Tiny/' . self::plugin_version();
3131
}
3232

3333
protected static function translate($phrase) {

0 commit comments

Comments
 (0)