Subject: Simple HTTP server problem (without proxy)

From: "Voronkov Konstantin" <[email-masked]>
Date: Wed, 28 May 2003 12:42:32 -0400 (EDT)

Hello All!

I have got following problem. I have implemented
 simple HTTP server which sends "Hello" to all requests.

HTTP/1.1 200 OK\r\n
Connection: close\r\n
Proxy-Connection: close\r\n
Content-Type: text-html\r\n
Pragma: no-cache\r\n
Cache-Control: no-cache\r\n
Cache-Control: no-transform\r\n
Content-Length: 5\r\n\r\n
Hello

If request goes from proxy my HTTP server works fine, but if it goes
 from the same computer without proxy server (http://localhost:81),
 then IE does not shows "Hello". It waits as if I did not sending replay.

What have I mixed in HTTP Headers? Why does not HTTP server works?

Best Regards,
Voronkov Konstantin

---

From: Bjoern Hoehrmann <[email-masked]>
Date: Wed, 28 May 2003 18:53:26 +0200

>Content-Type: text-html\r\n
                   ^ / and more accurate would be text/plain

>Content-Length: 5\r\n\r\n

This body contains four bytes, not five.

---

From: David Morris <[email-masked]>
Date: Wed, 28 May 2003 10:08:58 -0700 (PDT)

Actually, his body does contain 5 bytes. I have vague memory that in the
past some browsers required a \r\n following the content.

---

From: "Voronkov Konstantin" <[email-masked]>
Date: Thu, 29 May 2003 03:55:32 -0400 (EDT)

Thanks you all for help,

The problem was that I asked to close connection
 but I did not called closesocket() API.
And browser waited that event.

Best Regards,
Voronkov Konstantin

----- Original Message ----- 
From: "David Morris" <[email-masked]>
To: "Bjoern Hoehrmann" <[email-masked]>
Cc: "Voronkov Konstantin" <[email-masked]>;
<[email-masked]>
Sent: Wednesday, May 28, 2003 9:08 PM
Subject: Re: Simple HTTP server problem (without proxy)