浏览代码

Add comment, fixes #4145

Jordi Boggiano 9 年之前
父节点
当前提交
9859859f10
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/Composer/Util/RemoteFilesystem.php

+ 2 - 0
src/Composer/Util/RemoteFilesystem.php

@@ -227,6 +227,8 @@ class RemoteFilesystem
                 if (preg_match('{^content-encoding: *gzip *$}i', $header)) {
                     $decode = true;
                 } elseif (preg_match('{^HTTP/}i', $header)) {
+                    // In case of redirects, http_response_headers contains the headers of all responses
+                    // so we reset the flag when a new response is being parsed as we are only interested in the last response
                     $decode = false;
                 }
             }