Prechádzať zdrojové kódy

Merge pull request #478 from joanhey/header

Simplify and faster headers from Set-Cookie
walkor 6 rokov pred
rodič
commit
86538beccd
1 zmenil súbory, kde vykonal 1 pridanie a 3 odobranie
  1. 1 3
      Protocols/Http.php

+ 1 - 3
Protocols/Http.php

@@ -242,9 +242,7 @@ class Http
         // other headers
         foreach (HttpCache::$header as $key => $item) {
             if ('Set-Cookie' === $key && \is_array($item)) {
-                foreach ($item as $it) {
-                    $header .= $it . "\r\n";
-                }
+                $header .= \implode("\r\n", $item) . "\r\n";
             } else {
                 $header .= $item . "\r\n";
             }