- wxChar buf[256];
-
- wxGetTempFileName( _T("wxhtml"), buf);
- info = new wxInetCacheNode(buf, content);
- m_Cache.Put(right, info);
-
- { // ok, now copy it:
- wxFileOutputStream sout(wxString(buf));
- s -> Read(sout); // copy the stream
+ s = url.GetInputStream();
+ content = url.GetProtocol().GetContentType();
+ if (content == wxEmptyString) content = GetMimeTypeFromExt(location);
+ if (s)
+ {
+ wxChar buf[256];
+
+ wxGetTempFileName( wxT("wxhtml"), buf);
+ info = new wxInetCacheNode(buf, content);
+ m_Cache.Put(right, info);
+
+ { // ok, now copy it:
+ wxFileOutputStream sout((wxString)buf);
+ s -> Read(sout); // copy the stream
+ }
+ delete s;