Fix request_handler bug

Request handler was hanging when parsing JSON because it expected
an EOF.  Now we explicitly tell the parser how many bytes to read
to avoid this problem.