Skip to content

Commit

Permalink
Merge pull request #3 from jabdoa2/master
Browse files Browse the repository at this point in the history
Add missing status codes (thanks @jabdoa2!)
  • Loading branch information
kamermans authored Jul 4, 2017
2 parents 79469cf + f6994d3 commit 35835e0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/HAProxy/Command/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class Base {
'NONE' => 'Nothing has changed.',
'EXCD' => 'Action not processed: the buffer couldn\'t store all the data. You should retry with less servers at a time.',
'DENY' => 'Action denied.',
'ERRP' => 'Invalid parameters.',
'PART' => 'Action was only partially successful.',
'UNKN' => 'Unexpected error.'
);

Expand Down Expand Up @@ -72,10 +74,10 @@ protected function getHttpCode($response_lines) {
protected function getResponseMessage($response_lines) {
//var_export($response_lines);
foreach ($response_lines as $line) {
if (preg_match('/^[Ll]ocation.+;st=(DONE|NONE|EXCD|DENY|UNKN)/', $line, $matches)) {
if (preg_match('/^[Ll]ocation.+;st=(DONE|NONE|EXCD|DENY|UNKN|PART|ERRP)/', $line, $matches)) {
return $this->response_map[$matches[1]];
}
}
return 'Unable to parse server response';
}
}
}

0 comments on commit 35835e0

Please sign in to comment.