* Committing new wxSocket core (socket.cpp sckint.cpp). It has to be improved ...
* Adding sckint.cpp to various makefiles. * Fixes in threadpsx.cpp (Pause/Resume) * Fixes in threaded event dispatching * Added Clone() to wxObject * Implemented Clone() in wxEvent and wxSocketEvent * wxSocket sample save the data got from the URL in test.url (this will change) * As I only tested wxSocket on Linux Redhat 5.2 I disabled it by default on Windows, Mac and Unix platforms. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2289 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -116,6 +116,7 @@ void wxHTTP::SendHeaders()
|
||||
bool wxHTTP::ParseHeaders()
|
||||
{
|
||||
wxString line;
|
||||
wxStringTokenizer tokenzr;
|
||||
|
||||
m_headers.Clear();
|
||||
m_read = TRUE;
|
||||
@@ -128,17 +129,13 @@ bool wxHTTP::ParseHeaders()
|
||||
if (line.Length() == 0)
|
||||
break;
|
||||
|
||||
wxPrintf(_T("Header: %s\n"), WXSTRINGCAST line);
|
||||
int pos = line.Find(':');
|
||||
if (pos == -1)
|
||||
printf("Header: %s\n", WXSTRINGCAST line);
|
||||
tokenzr.SetString(line, " :\t\n\r");
|
||||
if (!tokenzr.HasMoreToken())
|
||||
return FALSE;
|
||||
|
||||
wxString left_str = line(0, pos);
|
||||
wxString right_str = line(pos+1, line.Length());
|
||||
|
||||
right_str = right_str.Strip(wxString::leading);
|
||||
|
||||
wxString *str = new wxString(right_str);
|
||||
wxString left_str = tokenzr.GetNextToken();
|
||||
wxString *str = new wxString(tokenzr.GetNextToken());
|
||||
|
||||
m_headers.Append(left_str, (wxObject *) str);
|
||||
}
|
||||
|
Reference in New Issue
Block a user