* Added a small wxHTTP description
* Added some example/description to wxFTP * Some more on wxURL * Added missing file in wxMMedia git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1795 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -231,7 +231,10 @@ bool wxHTTP::BuildRequest(const wxString& path, wxHTTP_Req req)
|
||||
class wxHTTPStream : public wxSocketInputStream {
|
||||
public:
|
||||
wxHTTP *m_http;
|
||||
size_t m_httpsize;
|
||||
|
||||
wxHTTPStream(wxHTTP *http) : wxSocketInputStream(*http), m_http(http) {}
|
||||
size_t StreamSize() { return m_httpsize; }
|
||||
virtual ~wxHTTPStream(void) { m_http->Abort(); }
|
||||
};
|
||||
|
||||
@@ -255,5 +258,8 @@ wxInputStream *wxHTTP::GetInputStream(const wxString& path)
|
||||
if (!BuildRequest(path, wxHTTP_GET))
|
||||
return NULL;
|
||||
|
||||
if (GetHeader("Content-Length").IsEmpty())
|
||||
inp_stream->m_httpsize = atoi(WXSTRINGCAST GetHeader("Content-Length"));
|
||||
|
||||
return inp_stream;
|
||||
}
|
||||
|
Reference in New Issue
Block a user