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

HTTP/1.1 400 Bad Request - POST -transfer encoding chunked

 
   Web Hosting Problem Solving Community! (Home) -> IIS RSS
Next:  Integrated authentication (NTLM)  
Author Message
tnahal_78

External


Since: Jun 08, 2004
Posts: 1



(Msg. 1) Posted: Wed Jun 09, 2004 1:56 am
Post subject: HTTP/1.1 400 Bad Request - POST -transfer encoding chunked
Archived from groups: microsoft>public>inetserver>iis (more info?)

Hi all.
Have to upload a binary file from a C client to IIS with transfer encoding set to CHUNKED .
So using POST request for the same. My test request is as follows
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sprintf(buff,"POST /cgi-bin/simple_cgi.exe HTTP/1.1\r\nHost: localhost:80\r\nConnection: keep-alive\r\nTransfer-encoding: chunked\r\n\r\n");
send(conn,buff,strlen(buff),0);

sprintf(buff,"400\r\n81111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111999\r\n");
send(conn,buff,strlen(buff),0);

sprintf(buff,"000\r\n\r\n");
send(conn,buff,strlen(buff),0);
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
But with IIS V 5.0 i'm getting an error - HTTP/1.1 400 Bad Request. and the cgi is not invoked at all

This same request is working fine with two other webservers that i tried namely Liteserv & Abyss.

Have referred to link
http://support.microsoft.com/default.aspx?scid=kb;en-us;278998&Product=iis50
and set the value for AspEnableChunkedEncoding to True but still....

Pls help me to get this working.
or pls point out any good internet resources which could help.

Thanks is anticipation guys,
Tejasv..

 >> Stay informed about: HTTP/1.1 400 Bad Request - POST -transfer encoding chunked 
Back to top
Login to vote
apasc

External


Since: Sep 02, 2004
Posts: 28



(Msg. 2) Posted: Thu Sep 23, 2004 3:18 am
Post subject: RE: HTTP/1.1 400 Bad Request - POST -transfer encoding chunked [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

--------------------
| Thread-Topic: HTTP/1.1 400 Bad Request - POST -transfer encoding chunked
| thread-index: AcRN5nG2spKMmxpsR4W0B3u8wo3o+Q==
| X-WN-Post: microsoft.public.inetserver.iis
| From: =?Utf-8?B?VGVqYXN2?= <tnahal_78.DeleteThis@yahoo.co.in>
| Subject: HTTP/1.1 400 Bad Request - POST -transfer encoding chunked
| Date: Tue, 8 Jun 2004 22:56:01 -0700
| Lines: 28
| Message-ID: <F6C38E13-271B-417A-8E8A-0FCDDC474C51.DeleteThis@microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.inetserver.iis
| Path: cpmsftngxa10.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.inetserver.iis:309421
| NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
| X-Tomcat-NG: microsoft.public.inetserver.iis
|
| Hi all.
Have to upload a binary file from a C client to IIS with transfer encoding
set to CHUNKED .
So using POST request for the same. My test request is as follows
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-------------------------------
sprintf(buff,"POST /cgi-bin/simple_cgi.exe HTTP/1.1\r\nHost:
localhost:80\r\nConnection: keep-alive\r\nTransfer-encoding:
chunked\r\n\r\n");
send(conn,buff,strlen(buff),0);

sprintf(buff,"400\r\n8111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111999\r\n");
send(conn,buff,strlen(buff),0);

sprintf(buff,"000\r\n\r\n");
send(conn,buff,strlen(buff),0);
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-------------------------------
But with IIS V 5.0 i'm getting an error - HTTP/1.1 400 Bad Request. and the
cgi is not invoked at all

This same request is working fine with two other webservers that i tried
namely Liteserv & Abyss.

Have referred to link
<a style='text-decoration: underline;' href="http://support.microsoft.com/default.aspx?scid=kb;en-us;278998&Product=iis50" target="_blank">http://support.microsoft.com/default.aspx?scid=kb;en-us;278998&Product=iis50</a>
and set the value for AspEnableChunkedEncoding to True but still....

Pls help me to get this working.
or pls point out any good internet resources which could help.

Thanks is anticipation guys,
Tejasv..


|
Hello Tejasv,
  it looks like you may be encountering the issue discussed in :
810957 You receive more than one "400 bad request" response to one HTTP
request
<a style='text-decoration: underline;' href="http://support.microsoft.com/?id=810957" target="_blank">http://support.microsoft.com/?id=810957</a>

Modifying the "uploadreadaheadsize" may help
<a style='text-decoration: underline;' href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iissdk/iis/" target="_blank">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iissdk/iis/</a>
ref_mb_uploadreadaheadsize.asp

regards,
Andrew Pasco
This posting is provided "AS IS" with no warranties, and confers no rights<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: HTTP/1.1 400 Bad Request - POST -transfer encoding chunked 
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 ]