I’ve had the same problem. I went through a bunch of archives and noticed one particularly pertinent comment: try again.
I did the checking for whitespace bit – made no difference.
After about five goes, I noticed there was some progress past the error message.
After a dozen goes, all posts and comments were imported successfully. During the process, the CURL error message remained in place at the top of the box.
I don’t deny the truth of any comments about server setups, host restrictions etc. But it’s worth being persistent.