File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -28,10 +28,11 @@ class Http
2828 * @param string $filename The name of the filename to display to browsers
2929 * @param string|bool $content The content to output for the download. If empty just the headers will be sent
3030 * @return boolean
31+ *
32+ * @codeCoverageIgnore
3133 */
3234 public static function download ($ filename , $ content = false )
3335 {
34- // @codeCoverageIgnoreStart
3536 if (!headers_sent ()) {
3637 // Required for some browsers
3738 if (Vars::bool (Sys::iniGet ('zlib.output_compression ' ))) {
@@ -62,7 +63,6 @@ public static function download($filename, $content = false)
6263 }
6364
6465 return false ;
65- // @codeCoverageIgnoreEnd
6666 }
6767
6868 /**
@@ -186,7 +186,9 @@ public static function getHeaders()
186186
187187 // PHP_AUTH_USER/PHP_AUTH_PW
188188 if (isset ($ headers ['PHP_AUTH_USER ' ])) {
189- $ headers ['AUTHORIZATION ' ] = 'Basic ' . base64_encode ($ headers ['PHP_AUTH_USER ' ] . ': ' . $ headers ['PHP_AUTH_PW ' ]);
189+ $ authorization = 'Basic ' . base64_encode ($ headers ['PHP_AUTH_USER ' ] . ': ' . $ headers ['PHP_AUTH_PW ' ]);
190+
191+ $ headers ['AUTHORIZATION ' ] = $ authorization ;
190192
191193 } elseif (isset ($ headers ['PHP_AUTH_DIGEST ' ])) {
192194 $ headers ['AUTHORIZATION ' ] = $ headers ['PHP_AUTH_DIGEST ' ];
You can’t perform that action at this time.
0 commit comments