- sprintf(buf, "%s %s HTTP/1.0\n\r", tmp_buf, (const char *)path);
- Write(buf, strlen(buf));
+ // If there is no User-Agent defined, define it.
+ if (GetHeader(wxT("User-Agent")).IsNull())
+ SetHeader(wxT("User-Agent"), wxT("wxWindows 2.x"));
+
+ SaveState();
+ SetFlags(wxSOCKET_NONE);
+ Notify(FALSE);
+
+ wxString buf;
+ buf.Printf(wxT("%s %s HTTP/1.0\r\n"), request, path.c_str());
+ const wxWX2MBbuf pathbuf = wxConvLocal.cWX2MB(buf);
+ Write(pathbuf, strlen(wxMBSTRINGCAST pathbuf));