Skip to content

Commit

Permalink
Removed unnecessary method renderResponseLine() on line 463 to 471, s…
Browse files Browse the repository at this point in the history
…uggest using method renderStatusLine() on line 227 to 241 instead. I have also updated the toString() method, in the first line of the function from $str = $this->renderResponseLine() to $str-> = $this->renderStatusLine(), I also suggest changing from "\r\n" to PHP_EOL. Updates will be needed in Zend\Http\PhpEnvironment\Response to. Go look for comment on that aswell.
  • Loading branch information
feskehau committed Jan 3, 2012
1 parent 4a20763 commit 96d0afe
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions library/Zend/Http/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -460,15 +460,6 @@ public function isSuccess()
return (200 <= $code && 300 > $code);
}

/**
* Render the response line string
*
* @return string
*/
public function renderResponseLine()
{
return 'HTTP/' . $this->getVersion() . ' ' . $this->getStatusCode() . ' ' . $this->getReasonPhrase();
}

/**
* Render entire response as HTTP response string
Expand All @@ -477,7 +468,7 @@ public function renderResponseLine()
*/
public function toString()
{
$str = $this->renderResponseLine() . "\r\n";
$str = $this->renderStatusLine() . PHP_EOL;
$str .= $this->headers()->toString();
$str .= "\r\n";
$str .= $this->getBody();
Expand Down

0 comments on commit 96d0afe

Please sign in to comment.