X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f4ada568223b79c8a5769cc351c36a8e2ccd7841..a1ee9ea29c3a00779d97be65b9f99e8f644b9a1a:/src/common/http.cpp diff --git a/src/common/http.cpp b/src/common/http.cpp index 4f90e220e9..221dddb876 100644 --- a/src/common/http.cpp +++ b/src/common/http.cpp @@ -13,6 +13,16 @@ #pragma implementation "http.h" #endif +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#ifndef WX_PRECOMP +#endif + #include #include #include "wx/string.h" @@ -22,10 +32,6 @@ #include "wx/protocol/http.h" #include "wx/sckstrm.h" -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - #if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxHTTP, wxProtocol) IMPLEMENT_PROTOCOL(wxHTTP, "http", "80", TRUE) @@ -46,7 +52,7 @@ wxHTTP::wxHTTP() wxHTTP::~wxHTTP() { // wxString isn't a wxObject - wxNode *node = m_headers.First(); + wxNode *node = m_headers.First(); wxString *string; while (node) { @@ -91,12 +97,14 @@ void wxHTTP::SendHeaders() { wxNode *head = m_headers.First(); - while (head) { + while (head) + { wxString *str = (wxString *)head->Data(); - char buf[100]; - sprintf(buf, "%s: %s\n\r", head->key.string, str->GetData()); - Write(buf, strlen(buf)); + wxString buf; + buf.Printf("%s: %s\n\r", head->GetKeyString(), str->GetData()); + + Write(buf, buf.Len()); head = head->Next(); }