JK2 AJP13 and Content-Length

2004-07-27 Thread Hannah Li
In AJPv13 doc, there is a note:
*Note: *The *content-length* header is extremely important. If it is 
present and non-zero, the container assumes that the request has a body 
(a POST request, for example), and immediately reads a separate packet 
off the input stream to get that body.

Does it mean the request header has to have Content-Length specified in 
order to get the request body? In my program, I have to send requests 
which contains Transfer-Encoding: chunked in the header (the request is 
forwarded from IIS5 to Tomcat4.1.30 by mod_jk2-2.0.4). This means my 
request header does not have Content-Length. How can I get the request 
body using AJP13?


Re: AW: JK2 AJP13 and Content-Length

2004-07-27 Thread Hannah Li
This has been bother me for quite some time and I have searched and 
googled everywhere but can not find an answer. I just want to make sure 
whether AJPv13 reads request body sent in chunks (no Content-Length in 
header). If AJPv13 does handle it, I may need to find some other causes 
like I may not have IIS configured right, etc.


Gunnar Pörschke wrote:
Hello Hannah,
The header has a content - lengh, but don't ask me what size :-( I'm facing
nearly the same problem. And I stuck on the doc as well..
:-(
You need to set the content lengh, but you need to set this lengh. I didn't
set the lengh and I had trouble while post command (file upload). 
(You'll not get this problem without ajpv13)

As soon as I vahe more information about that, I 'll post it.
Regards,
gunnar
-Ursprüngliche Nachricht-
Von: Hannah Li [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 27. Juli 2004 09:07
An: [EMAIL PROTECTED]
Betreff: JK2 AJP13 and Content-Length

In AJPv13 doc, there is a note:
*Note: *The *content-length* header is extremely important. If it is present
and non-zero, the container assumes that the request has a body (a POST
request, for example), and immediately reads a separate packet off the input
stream to get that body.
Does it mean the request header has to have Content-Length specified in
order to get the request body? In my program, I have to send requests which
contains Transfer-Encoding: chunked in the header (the request is forwarded
from IIS5 to Tomcat4.1.30 by mod_jk2-2.0.4). This means my request header
does not have Content-Length. How can I get the request body using AJP13?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Tomcat4 + IIS5 + mod_jk2-2.0.4 : Problem on POST with Transfer-Encoding: chunked header

2004-07-23 Thread Hannah Li
I am working on link Tomcat with IIS using the JK2 ajp13 connector. So 
far, I have successfully configured JK2 to have IIS working with Tomcat 
and got some success running JSP pages. However, I am having a problem 
on HttpServletRequest:

My servlet receives a HTTP request from client which contains an XML 
document in the request body. Whenever I post a request thru IIS with a 
header Transfer-Encoding: chunked, the body of the request is missing 
(HttpServletRequest.getInputStream() is empty) and my program can not 
continue because the XML document is not there. This works fine if I 
directly go to Tomcat. If I set the Content-Length to the header, I can 
retrieve the request body alright. Since the xml doc is dynamically 
generated each time and vary in size, I have to send it in chunks.

There are some error messages in the JK2 log:
Error: [jk_channel_apr_socket.c (488)]: channelApr.receive(): Error 
receiving message body -1 0
Error: [jk_workerEnv.c (492)]: workerEnv.processCallbacks() Error 
reading reply
Error: [jk_worker_ajp13.c (546)]: ajp13.service() ajpGetReply 
recoverable error 12

I don't know which part I did wrong. Is the IIS configurations? or JK2?  
Please help and point me some directions.

I am using:
IIS5.0
Tomcat 4.1.30
JK2 2.0.4
and here is one of my sample request shown in the tcptrace:
-
Header
POST /hctest/servlet/HandCloudServer HTTP/1.1
marshaller: HCLOUDSYNCMARSHALLER
User-Agent: Jakarta Commons-HttpClient/2.0rc3
Host: localhost:8081
Transfer-Encoding: chunked
Body
18c
?xml version=1.0 
encoding=UTF-8?methodCallmethodNamesearch/methodNameparamsparams(Product_Id=100)/s/paramparamsProduct/s/paramparamarray/array/paramparamdt2004-07-22T21:50:20/dt/paramparamint0/int/paramparamint-1/int/param/params/methodCall 

0
-
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Tomcat-IIS-JK2 : Problem on POST with Transfer-Encoding: chunked

2004-07-22 Thread Hannah Li
I have successfully configured JK2 to have IIS working with Tomcat. 
However, I am having a problem:

My servlet receives a HTTP request from client which contains an XML 
document in the request body. Whenever I post a request thru IIS with a 
header Transfer-Encoding: chunked, the body of the request is missing 
(HttpServletRequest.getInputStream() is empty) and my program can not 
continue because the XML document is not there. This works fine if I 
directly go to Tomcat. If I set the Content-Length to the header, I can 
retrieve the request body alright. Since the xml doc is dynamically 
generated each time and vary in size, I have to send it in chunks.

There are some error messages in the JK2 log:
Error: [jk_channel_apr_socket.c (488)]: channelApr.receive(): Error 
receiving message body -1 0
Error: [jk_workerEnv.c (492)]: workerEnv.processCallbacks() Error 
reading reply
Error: [jk_worker_ajp13.c (546)]: ajp13.service() ajpGetReply 
recoverable error 12

I don't know which part I did wrong. Is the IIS configurations? or JK2?  
Please help and point me some directions.

I am using:
IIS5.0
Tomcat 4.1.30
JK2 2.0.4
and here is one of my sample request shown in the tcptrace:
-
Header
POST /hctest/servlet/HandCloudServer HTTP/1.1
marshaller: HCLOUDSYNCMARSHALLER
User-Agent: Jakarta Commons-HttpClient/2.0rc3
Host: localhost:8081
Transfer-Encoding: chunked
Body
18c
?xml version=1.0 
encoding=UTF-8?methodCallmethodNamesearch/methodNameparamsparams(Product_Id=100)/s/paramparamsProduct/s/paramparamarray/array/paramparamdt2004-07-22T21:50:20/dt/paramparamint0/int/paramparamint-1/int/param/params/methodCall
0
-


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]