]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/http.cpp
accept files in wxHtmlEasyPrinting::{Print,Preview}File, not only URLs
[wxWidgets.git] / src / common / http.cpp
index 21381bd83a5dd7e05371269dd9c47e07aecc27a5..0e7d3a33469e578d1646faa53ed8c0ce66373812 100644 (file)
@@ -219,7 +219,7 @@ bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req)
   case wxHTTP_POST:
     request = wxT("POST");
     if ( GetHeader( wxT("Content-Length") ).IsNull() )
-      SetHeader( wxT("Content-Length"), wxString::Format( wxT("%ld"), m_post_buf.Len() ) );
+      SetHeader( wxT("Content-Length"), wxString::Format( wxT("%lu"), (unsigned long)m_post_buf.Len() ) );
     break;
   default:
     return FALSE;
@@ -232,7 +232,11 @@ bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req)
     SetHeader(wxT("User-Agent"), wxT("wxWidgets 2.x"));
 
   SaveState();
+#if wxUSE_THREADS
   SetFlags( wxThread::IsMain() ? wxSOCKET_NONE : wxSOCKET_BLOCK );
+#else
+  SetFlags( wxSOCKET_NONE );
+#endif
   Notify(FALSE);
 
   wxString buf;