这是我的代码
CInternetSession session(L"My Session");
CHttpConnection *pHttpCon ;
CHttpFile *filedat = NULL;
pHttpCon = session.GetHttpConnection((LPCTSTR)Url_server, (INTERNET_PORT)1040, (LPCTSTR)username, (LPCTSTR)password);
filedat = pHttpCon->OpenRequest(CHttpConnection::HTTP_VERB_GET, "");
filedat->SendRequest();
CString line;
while(filedat->ReadString(line)) {
printf("Line : %s ",(LPCTSTR)line);
printf("\n Line Length : %d ",line.GetLength());
}
问题是字符串读取是“file1.name=201304”,长度是 9 它应该是 17 或更多。有大佬能告诉我是什么问题吗???
String Read Showing Length
"file1.size=16" 7
"file1.time=2013/02/28 Thu 10:36:32" 17
"file1.name=201304" 9