Welcome to HostingForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

IIS & Chunk Encoded Data Support

 
   Web Hosting Problem Solving Community! (Home) -> IIS RSS
Next:  Host headers?  
Author Message
user1040

External


Since: Nov 04, 2003
Posts: 2



(Msg. 1) Posted: Tue Nov 04, 2003 12:35 pm
Post subject: IIS & Chunk Encoded Data Support
Archived from groups: microsoft>public>inetserver>iis, others (more info?)

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 <a style='text-decoration: underline;' href="http://MyHost/cgi-bin/MyHttpSrv.exe" target="_blank">http://MyHost/cgi-bin/MyHttpSrv.exe</a> 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<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: IIS & Chunk Encoded Data Support 
Back to top
Login to vote
someone9

External


Since: Aug 25, 2003
Posts: 2419



(Msg. 2) Posted: Thu Nov 06, 2003 12:34 am
Post subject: Re: IIS & Chunk Encoded Data Support [Login to view extended thread Info.]
Archived from groups: microsoft>public>inetserver>iis (more info?)

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

 >> Stay informed about: IIS & Chunk Encoded Data Support 
Back to top
Login to vote
user1040

External


Since: Nov 04, 2003
Posts: 2



(Msg. 3) Posted: Wed Nov 12, 2003 9:26 am
Post subject: Re: IIS & Chunk Encoded Data Support [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi David,

I appreciate your advise.

However, each time i post data to my CGI server with
transfert-encoding header, i receive a 400-Bad request message.
On the other hand, if I post data with content-length header, the
server runs correctly.

Here is the request I post :
POST <a style='text-decoration: underline;' href="http://MyHost/cgi-bin/MyHttpSrv.exe" target="_blank">http://MyHost/cgi-bin/MyHttpSrv.exe</a> HTTP/1.1\r\n
Transfer-encoding: chunked\r\n
Host: MyHost\r\n
Accept: */*\r\n
Connection: keep-alive\r\n
Content-type: application/octet-stream\r\n
\r\n
4\r\ntiti\r\n
0\r\n\r\n

Do you have any suggestion ?

I thank you for your help

Lsa

"David Wang [Msft]" <someone RemoveThis @online.microsoft.com> wrote in message news:<ONLg58MpDHA.1740 RemoveThis @TK2MSFTNGP12.phx.gbl>...
 > 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 <a style='text-decoration: underline;' href="http://MyHost/cgi-bin/MyHttpSrv.exe" target="_blank">http://MyHost/cgi-bin/MyHttpSrv.exe</a> 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<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: IIS & Chunk Encoded Data Support 
Back to top
Login to vote
someone9

External


Since: Aug 25, 2003
Posts: 2419



(Msg. 4) Posted: Fri Nov 14, 2003 7:42 pm
Post subject: Re: IIS & Chunk Encoded Data Support [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I'm not certain what's causing the 400 response to your request -- because
that request works just fine for me on W2K Pro. What other software/ISAPI
are you running on your web server?

--
//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.0311120626.162d8846@posting.google.com...
Hi David,

I appreciate your advise.

However, each time i post data to my CGI server with
transfert-encoding header, i receive a 400-Bad request message.
On the other hand, if I post data with content-length header, the
server runs correctly.

Here is the request I post :
POST <a style='text-decoration: underline;' href="http://MyHost/cgi-bin/MyHttpSrv.exe" target="_blank">http://MyHost/cgi-bin/MyHttpSrv.exe</a> HTTP/1.1\r\n
Transfer-encoding: chunked\r\n
Host: MyHost\r\n
Accept: */*\r\n
Connection: keep-alive\r\n
Content-type: application/octet-stream\r\n
\r\n
4\r\ntiti\r\n
0\r\n\r\n

Do you have any suggestion ?

I thank you for your help

Lsa

"David Wang [Msft]" <someone RemoveThis @online.microsoft.com> wrote in message
news:<ONLg58MpDHA.1740 RemoveThis @TK2MSFTNGP12.phx.gbl>...
 > 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 <a style='text-decoration: underline;' href="http://MyHost/cgi-bin/MyHttpSrv.exe" target="_blank">http://MyHost/cgi-bin/MyHttpSrv.exe</a> 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<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: IIS & Chunk Encoded Data Support 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting Problem Solving Community! (Home) -> IIS All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]