Netty has problem to deal with the "Connection: close" message ... We cannot read the content.

Neio pinghuican at gmail.com
Tue Jun 2 13:37:09 EDT 2009


Netty has problem to deal with the "Connection: close" message.


I have tomcat server which sends back "Connection: close" for every 100th
reply. I noticed that netty had problem to deal with it.

1:) netty thinks it is still a "chunked" response. So for the first
messageReceive() call, there is no content.
2:) netty think the "connection: close", and it closes the channel.

There is no way to get the content.  

I am pasting the tcpdump for 99th and 100th request/response. You will see
there is "Connection: close" header for 100th message.

This is a big issue for us, could you please look at it? 
Thanks a million.

======= 99th request/response ============
POST /axis2/services/NSEchoService HTTP/1.1
Host: localhost
SOAPAction: "http://example.org/soapformat/Example"
Content-Length: 314
Content-Type: text/xml

<?xml version="1.0" encoding="utf-8"?>
<SOAP:Envelope
xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"><SOAP:Body><ns1:echo
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://example1.org/example1">
                <Text>hello</Text>
          </ns1:echo></SOAP:Body></SOAP:Envelope>HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=UTF-8
Transfer-Encoding: chunked
Date: Tue, 02 Jun 2009 15:50:12 GMT

f8
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns1:echo
xmlns:ns1="http://example1.org/example1"><Text>echo:
hello</Text></ns1:echo></soapenv:Body></soapenv:Envelope>
0

======= 100th request/response ============
POST /axis2/services/NSEchoService HTTP/1.1
Host: localhost
SOAPAction: "http://example.org/soapformat/Example"
Content-Length: 314
Content-Type: text/xml

<?xml version="1.0" encoding="utf-8"?>
<SOAP:Envelope
xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"><SOAP:Body><ns1:echo
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://example1.org/example1">
                <Text>hello</Text>
          </ns1:echo></SOAP:Body></SOAP:Envelope>HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=UTF-8
Date: Tue, 02 Jun 2009 15:50:12 GMT
Connection: close

<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns1:echo
xmlns:ns1="http://example1.org/example1"><Text>echo:
hello</Text></ns1:echo></soapenv:Body></soapenv:Envelope>

-- 
View this message in context: http://n2.nabble.com/Netty-has-problem-to-deal-with-the-%22Connection%3A-close%22-message-...-We-cannot-read-the-content.-tp3013392p3013392.html
Sent from the Netty User Group mailing list archive at Nabble.com.




More information about the netty-users mailing list