Solve the problem of getting HTTP content from InputStream