Skip to content

Commit

Permalink
Fixed Http Service on PHP 5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
andot committed Sep 9, 2016
1 parent 40f032b commit 3b8df37
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Hprose/Http/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* *
* hprose http service class for php 5.3+ *
* *
* LastModified: Aug 9, 2016 *
* LastModified: Sep 9, 2016 *
* Author: Ma Bingyao <[email protected]> *
* *
\**********************************************************/
Expand Down Expand Up @@ -144,13 +144,13 @@ public function handle($request = null, $response = null) {
}
if (Future\isFuture($result)) {
$result->then(function($result) use ($self, $context) {
$this->header('Content-Length', strlen($result), $context);
$self->header('Content-Length', strlen($result), $context);
$self->writeResponse($result, $context);
});
}
else {
$this->header('Content-Length', strlen($result), $context);
$self->writeResponse($result, $context);
$this->writeResponse($result, $context);
}
return $context->response;
}
Expand Down

0 comments on commit 3b8df37

Please sign in to comment.