Fixed buffering problem in reading HTTP response