X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/df4b7d9894cccf1d3221e07d6a98be670706ae5d..353327844e319db755c2e7a07a4cf5b53cef35c4:/src/common/http.cpp?ds=sidebyside diff --git a/src/common/http.cpp b/src/common/http.cpp index db4eeb851f..d147823f15 100644 --- a/src/common/http.cpp +++ b/src/common/http.cpp @@ -299,7 +299,8 @@ bool wxHTTP::Abort(void) wxInputStream *wxHTTP::GetInputStream(const wxString& path) { - wxHTTPStream *inp_stream = new wxHTTPStream(this); + wxHTTPStream *inp_stream; + wxString new_path; m_perr = wxPROTO_CONNERR; @@ -313,6 +314,8 @@ wxInputStream *wxHTTP::GetInputStream(const wxString& path) if (!BuildRequest(path, wxHTTP_GET)) return NULL; + inp_stream = new wxHTTPStream(this); + if (!GetHeader(wxT("Content-Length")).IsEmpty()) inp_stream->m_httpsize = wxAtoi(WXSTRINGCAST GetHeader(wxT("Content-Length"))); else