Skip to content

Commit f4557be

Browse files
committed
Update Request.php
1 parent febce38 commit f4557be

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/Request.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,9 @@ public static function getRequestedURL() {
173173
*
174174
* @since 1.0
175175
*/
176-
public static function getRequestHeaders() {
176+
public static function getHeaders() {
177177
if (self::get()->requestHeaders === null || defined('__PHPUNIT_PHAR__')) {
178+
//Refresh headers if in testing environment.
178179
self::get()->requestHeaders = [];
179180

180181
if (function_exists('apache_request_headers')) {
@@ -210,7 +211,7 @@ public static function getAuthHeader() {
210211
];
211212
$headerVal = '';
212213

213-
$headers = self::getRequestHeaders();
214+
$headers = self::getHeaders();
214215

215216
if (isset($headers['authorization'])) {
216217
$headerVal = $headers['authorization'];

0 commit comments

Comments
 (0)