Fix in parse headers so it wouldn't always store an empty string
for each header value. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5913 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -142,13 +142,8 @@ bool wxHTTP::ParseHeaders()
|
||||
if (line.Length() == 0)
|
||||
break;
|
||||
|
||||
tokenzr.SetString(line, " :\t\n\r");
|
||||
if (!tokenzr.HasMoreTokens())
|
||||
return FALSE;
|
||||
|
||||
wxString left_str = tokenzr.GetNextToken();
|
||||
wxString *str = new wxString(tokenzr.GetNextToken());
|
||||
|
||||
wxString left_str = line.BeforeFirst(':');
|
||||
wxString *str = new wxString(line.AfterFirst(':').Strip(wxString::both));
|
||||
left_str.MakeUpper();
|
||||
|
||||
m_headers.Append(left_str, (wxObject *) str);
|
||||
|
Reference in New Issue
Block a user