我使用异步WinInet请求从服务器读取HTTPS数据。
我的情景用几句话说:
InternetUrlOpen
创建请求(返回null)INTERNET_STATUS_HANDLE_CREATED
通知,存储句柄INTERNET_STATUS_REQUEST_COMPLETE
InternetQueryDataAvailable
以了解要读取的数据量
InternetReadFile
读取数据,然后转到上一步InternetQueryDataAvailable
返回
ERROR_IO_PENDING
,然后等待下一个INTERNET_STATUS_REQUEST_COMPLETE
但在InternetQueryDataAvailable
返回ERROR_IO_PENDING
后,我收到INTERNET_STATUS_REQUEST_COMPLETE
dwError=276
,即ERROR_EA_FILE_CORRUPT
。之后我没有收到任何关于请求的通知,所以看起来请求确实失败了。
这意味着什么?
以下是一些日志:
...
CRequestImpl::InternetStatusCallback: Handle 0x00CC0010 created
CRequestImpl::InternetStatusCallback: Status: Detecting Proxy
CRequestImpl::InternetStatusCallback: Status: Cookie found and will be sent with request
CRequestImpl::InternetStatusCallback: Status: Sending request
CRequestImpl::InternetStatusCallback: Status: Request sent (1098 Bytes)
CRequestImpl::InternetStatusCallback: Status: Receiving Response
CRequestImpl::InternetStatusCallback: Status: Response Received (519 Bytes)
CRequestImpl::InternetStatusCallback: Status: Request complete, result=cc0010, err=0
CRequestImpl::onRequestComplete: error=0
CRequestImpl::onRequestComplete: internet data available, 276 bytes
CRequestImpl::onRequestComplete: read 276 bytes
CRequestImpl::InternetStatusCallback: Status: Receiving Response
CRequestImpl::InternetStatusCallback: Status: Response Received (1756 Bytes)
CRequestImpl::onRequestComplete: internet data available, 1679 bytes
CRequestImpl::onRequestComplete: read 1679 bytes
...
CRequestImpl::InternetStatusCallback: Status: Receiving Response
CRequestImpl::InternetStatusCallback: Status: Response Received (7 Bytes)
CRequestImpl::onRequestComplete: internet data available, 2 bytes
CRequestImpl::onRequestComplete: read 2 bytes
CRequestImpl::InternetStatusCallback: Status: Receiving Response
CRequestImpl::onRequestComplete: InternetQueryDataAvailable failed with error 997: Overlapped I/O operation is in progress.
CRequestImpl::InternetStatusCallback: Status: Response Received (283 Bytes)
CRequestImpl::InternetStatusCallback: Status: Request complete, result=1, err=276
CRequestImpl::onRequestComplete: error=276
CRequestImpl::onRequestComplete: Internet request failed with error 276: The extended attribute file on the mounted file system is corrupt.