I have a program that calls send (), I need to change the host to my own, but this does not work (either the program crashes or the request does not reach the server) - I log requests on the server. What could be the problem?
int WINAPI Mine_Send(SOCKET s, const char* buf, int len, int flags) {
string sdata = "Host: myhost.com\r\r\nConnection: close\r\r\nAccept-Encoding: gzip,deflate\r\r\n\r\r\n";
const char* cstr = sdata.c_str();
return Real_Send(s, cstr, strlen(cstr), flags);
}