Use s instead of req->stream.
No need to set l here
Use proper error message