Fix bug in memory-based HTTP data content initialization with input stream.

Content initialization with input stream doesn't work for memory-based HTTP datas. I fix the problem and add test for this case.