Skip to content

Commit ba1a244

Browse files
author
Wazabii
committed
Improvements
1 parent fe22555 commit ba1a244

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

Message.php

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,18 +101,17 @@ public function getHeaderLine($name)
101101
*/
102102
public function getHeaderLineData(string $name): ?array
103103
{
104-
if(is_null($this->headerLine)) {
105-
$this->headerLine = array();
106-
$headerArr = $this->getHeader($name);
107-
foreach($headerArr as $key => $val) {
108-
if(is_numeric($key)) {
109-
$this->headerLine[] = $val;
110-
} else {
111-
$this->headerLine[] = "{$key} {$val}";
112-
}
104+
105+
$this->headerLine = array();
106+
$headerArr = $this->getHeader($name);
107+
foreach($headerArr as $key => $val) {
108+
if(is_numeric($key)) {
109+
$this->headerLine[] = $val;
110+
} else {
111+
$this->headerLine[] = "{$key} {$val}";
113112
}
114113
}
115-
114+
116115
return $this->headerLine;
117116
}
118117

Response.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ public function getReasonPhrase()
115115

116116
public function createHeaders()
117117
{
118+
/*
119+
print_r($this->getHeaders());
120+
die();
121+
*/
118122
foreach($this->getHeaders() as $key => $val) {
119123
$value = $this->getHeaderLine($key);
120124
header("{$key}: {$value}");

0 commit comments

Comments
 (0)