Skip to content

Commit

Permalink
Fixed Context-Length on http service.
Browse files Browse the repository at this point in the history
  • Loading branch information
andot committed Aug 9, 2016
1 parent 094ef19 commit baa97d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Hprose/Http/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,12 @@ public function handle($request = null, $response = null) {
}
if (Future\isFuture($result)) {
$result->then(function($result) use ($self, $context) {
$this->header('Content-Length', strlen($result));
$this->header('Content-Length', strlen($result), $context);
$self->writeResponse($result, $context);
});
}
else {
$this->header('Content-Length', strlen($result));
$this->header('Content-Length', strlen($result), $context);
$self->writeResponse($result, $context);
}
return $context->response;
Expand Down

0 comments on commit baa97d7

Please sign in to comment.