I am trying to write a small server that will recieve and send data as if it is an HTTP server. Recieving the data works fine, but the result I send is unacceptable by the client. When using telnet I can see that the result is sent, but apperantly there's something missing.
This is how I send the result:
sprintf (buf, "Content-type: text/html\nX-Powered-By: SHVAServer 1.0.0\n<HTML><BODY>\n%s\n</BODY>\n</HTML>\n", Result);
send (ns, buf, strlen(buf), 0);
What is missing here?
This is how I send the result:
sprintf (buf, "Content-type: text/html\nX-Powered-By: SHVAServer 1.0.0\n<HTML><BODY>\n%s\n</BODY>\n</HTML>\n", Result);
send (ns, buf, strlen(buf), 0);
What is missing here?