(fix) Ensure we actually write a full response.
Merge pull request #224 from reem/ensure-write-response

(fix) Ensure we actually write a full response.