I had a similar problem using ns_httpopen and trying to read from the channel, specifically trying to read graphics. What fixed the problem for me was giving read the value of the content-length header. Perhaps the connection was confused about the EOF character so it kept trying to read past the end of the file.