Skip to content

Commit 4c1740e

Browse files
committed
only set content-length if it exists.
1 parent 817fdd9 commit 4c1740e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: lib/Rackem/Server/Connection.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public function read()
128128
list($request, $headers) = $this->parse_header(substr($this->buffer, 0, $end));
129129
list($version, $status, $phrase) = explode(' ', $request, 3);
130130
$this->status = $status;
131-
$this->response_length = (int)$headers['Content-Length'][0];
131+
$this->response_length = isset($headers['Content-Length'])? (int)$headers['Content-Length'][0] : 0;
132132
}
133133

134134
/*

0 commit comments

Comments
 (0)