]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/http.cpp
don't use %08p format string, gcc complains about it
[wxWidgets.git] / src / common / http.cpp
index cc6ea854b9c82c904ae0b991464c170ad57f95eb..fcab146c82aa4f0d10cc77ad03ed59c72d287ce9 100644 (file)
@@ -9,10 +9,6 @@
 // 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"
 
@@ -335,6 +331,15 @@ size_t wxHTTPStream::OnSysRead(void *buffer, size_t bufsize)
     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;
 }