Currently i am developing a web server application in console. I am using a browser to connect to the host running this application. The server is able to receive the http request from the browser. The problem come in, what should i send in response? Below is a response i write but the browser did not display anything at all. What is wrong here?can anyone help me?
strcpy(szBuf, "HTTP/1.1 500 Server Error \nDate: Fri, 31 Dec 1999 23:59:59 GMT Content-Type: text/html Content-Length: 219"
if (send(s,szBuf,strlen(szBuf),0) == SOCKET_ERROR)
{
closesocket(s);
}
strcpy(szBuf, "HTTP/1.1 500 Server Error \nDate: Fri, 31 Dec 1999 23:59:59 GMT Content-Type: text/html Content-Length: 219"
if (send(s,szBuf,strlen(szBuf),0) == SOCKET_ERROR)
{
closesocket(s);
}