wxNode *node = m_headers.Find(header);
if (!node)
- m_headers.Append(header, (wxObject *)(new wxString(h_data)));
+ m_headers.Append(header.Upper(), (wxObject *)(new wxString(h_data)));
else {
wxString *str = (wxString *)node->GetData();
(*str) = h_data;
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)