]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/http.cpp
Fixed problem where corner label was displayed when either row or col label size...
[wxWidgets.git] / src / common / http.cpp
index bd5f2cad8f109b0026d09fdd3c22214a5b806b9b..7d24b92f3ef1c9afbea47f2f7ea17d5b3265b145 100644 (file)
 #include "wx/protocol/http.h"
 #include "wx/sckstrm.h"
 
-#if !USE_SHARED_LIBRARY
 IMPLEMENT_DYNAMIC_CLASS(wxHTTP, wxProtocol)
 IMPLEMENT_PROTOCOL(wxHTTP, wxT("http"), wxT("80"), TRUE)
-#endif
 
 #define HTTP_BSIZE 2048
 
@@ -144,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);