I edited answere in definition of HTTP
--code--
strcpy(sendbuf, "HTTP/1.0 200 OK\r\n" );
strcat(sendbuf, "Server: Custom server\r\n");
strcat(sendbuf, "Date: Tuesday, 07-Sep-04 14:47:04 GMT\r\n");
strcat(sendbuf, "Last-modified: Thursday, 07-Sep-04 10:44:53 GMT\r\n");
strcat(sendbuf, "Content-length: 6372\r\n");
strcat(sendbuf, "Content-type: text/html\r\n");
strcat(sendbuf, "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2
Final//EN\">\r\n");
strcat(sendbuf, "<html>Hello</html>");
--/code--
The problem is that when I try to connect to the server though Internet
Explorer, I do't receive the answer from the server. Why?
For more details, I do the next thing:
1. The server runs on my computer, and waits connections
2. In Internet Explorer, I enter localhost-address 127.0.01
3. The server says that there is a client who is connected.
4. The server receives the request from the client.
5. The server sends an answer.
6. ERR: Internet Explorer prints "The page cannot be displayed".
I suppose that it must be an error in formating of my answer...