Browse Source

Send source instead of @package_version@ for the composer version in UA

Jordi Boggiano 13 năm trước cách đây
mục cha
commit
73aea05907
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/Composer/Util/RemoteFilesystem.php

+ 1 - 1
src/Composer/Util/RemoteFilesystem.php

@@ -262,7 +262,7 @@ class RemoteFilesystem
     {
         $header = sprintf(
             "User-Agent: Composer/%s (%s; %s; PHP %s.%s.%s)\r\n",
-            Composer::VERSION,
+            Composer::VERSION === '@package_version@' ? 'source' : Composer::VERSION,
             php_uname('s'),
             php_uname('r'),
             PHP_MAJOR_VERSION,