IIS supports reading and sending Chunked entity body, and ASP illustrates
that it all works correctly, as you've observed.
So, I wouldn't say the issue is with IIS at all... If you send POST to a
CGI and the server looks like it's hanging, it's probably a bug in the CGI
that didn't read exactly the right amount.
I suggest you actually check the CONTENT_LENGTH variable, detect when the
entity body is present, chunked, or not, and then read as appropriate.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Lsa" <laurent.savelli.RemoveThis@cegedim.fr> wrote in message
news:623f505b.0311040935.6f2bf4a4@posting.google.com...
Hi everybody
I'm currently developping a Http 1.1 Client in C++.
I try to send chunk encoded data to a very simple http 1.1 CGI server
I have written in c++ for testing.
here the http request message the client sends :
POST
http://MyHost/cgi-bin/MyHttpSrv.exe HTTP/1.1\r\n
Host: MyHost\r\n
Transfer-encoding: chunked\r\n
Content-type: text/plain\r\n
\r\n
2\r\ngo\r\n
0\r\n
\r\n
My problem is that the server never responds anything. It seems to be
blocked.
My configuration :
- Win2000 Pro + Personnal Web Server (IIS 5.0 reduced version)
I have reduced the CGI to the simplier ... and nothing happens.
Here is CGI source code :
int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
{
cout << "Content-type: text/html\r\n" ;
cout << "Content-Length: 9\r\n" ;
cout << "\r\n";
cout << "Server OK";
return 0;
}
If I post the same request to an equivalent ASP page, the server runs
correctly !!??
Has anyone a suggestion ?
Tx
Lsa