]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/http.cpp
Added return NULL; for __WXCOCOA__
[wxWidgets.git] / src / common / http.cpp
index 81318deed86a5c53cfbb06af4a3b40530eb15e49..07076be3819dcdcc4ff6d9f7abe85fc7c72f8d3a 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     August 1997
 // RCS-ID:      $Id$
 // Copyright:   (c) 1997, 1998 Guilhem Lavaux
-// Licence:     wxWindows license
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
@@ -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)