detect EOF better when reading HTTP reply

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21234 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2003-06-18 22:09:09 +00:00
parent 3cac31513f
commit 32013d27f6

View File

@@ -293,15 +293,16 @@ protected:
size_t wxHTTPStream::OnSysRead(void *buffer, size_t bufsize)
{
size_t ret;
if (m_httpsize > 0 && m_read_bytes >= m_httpsize)
{
m_lasterror = wxSTREAM_EOF;
return 0;
}
if (m_httpsize > 0 && m_read_bytes >= m_httpsize)
return 0;
size_t ret = wxSocketInputStream::OnSysRead(buffer, bufsize);
m_read_bytes += ret;
ret = wxSocketInputStream::OnSysRead(buffer, bufsize);
m_read_bytes += ret;
return ret;
return ret;
}
bool wxHTTP::Abort(void)