// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
- #pragma implementation "http.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
while (1)
#endif
{
- m_perr = GetLine(this, line);
+ m_perr = ReadLine(this, line);
if (m_perr != wxPROTO_NOERR)
return false;
}
wxString tmp_str;
- m_perr = GetLine(this, tmp_str);
+ m_perr = ReadLine(this, tmp_str);
if (m_perr != wxPROTO_NOERR) {
RestoreState();
return false;
size_t ret = wxSocketInputStream::OnSysRead(buffer, bufsize);
m_read_bytes += ret;
+ if (m_httpsize==(size_t)-1 && m_lasterror == wxSTREAM_READ_ERROR )
+ {
+ // if m_httpsize is (size_t) -1 this means read until connection closed
+ // which is equivalent to getting a READ_ERROR, for clients however this
+ // must be translated into EOF, as it is the expected way of signalling
+ // end end of the content
+ m_lasterror = wxSTREAM_EOF ;
+ }
+
return ret;
}