Hey,
I need help keeping a http connection alive.
I have used setsockopt to set keepalive to 1, and in the http packet i set keep-alive to 300, but the server replies with:
Connection: close
my packet looks like
string buffer2="POST "+P.path+" HTTP/1.0\r\nHost: "+P.httpUrl+"\r\nUser-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729)\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-us,en;q=0.5\r\nAccept-Encoding: gzip,deflate\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7C\r\nontent-Length: ";
std::stringstream outo;
outo << tpost.length();
buffer2+= outo.str();
buffer2+="\r\n\r\n";
buffer2+=tpost;
buffer2+="\n";
from what ive seen around is that there coulds be an error in my http packet contents.
could anyone shed some light on thiis?