1
0
Fork 0

Add CI flag in UA header

pull/5845/head
Jordi Boggiano 2016-11-03 11:00:21 +01:00
parent e38ebefc7e
commit 0f455be01c
1 changed files with 3 additions and 2 deletions

View File

@ -141,11 +141,12 @@ final class StreamContextFactory
if (!isset($options['http']['header']) || false === strpos(strtolower(implode('', $options['http']['header'])), 'user-agent')) {
$options['http']['header'][] = sprintf(
'User-Agent: Composer/%s (%s; %s; %s)',
'User-Agent: Composer/%s (%s; %s; %s%s)',
Composer::VERSION === '@package_version@' ? 'source' : Composer::VERSION,
php_uname('s'),
php_uname('r'),
$phpVersion
$phpVersion,
getenv('CI') ? '; CI' : ''
);
}