fix: when reading response, only readline() if previous read()
was non-empty