You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2012/04/20 09:02:19 UTC

DO NOT REPLY [Bug 53112] New: Following asynchronous responses do not contain set response headers

https://issues.apache.org/bugzilla/show_bug.cgi?id=53112

             Bug #: 53112
           Summary: Following asynchronous responses do not contain set
                    response headers
           Product: Tomcat 7
           Version: 7.0.25
          Platform: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: stig@vangen.org
    Classification: Unclassified


This problem is related to this issue:
https://issues.apache.org/bugzilla/show_bug.cgi?id=50753

The first asynchronous request lets you set the response header, and that
response gets parsed correctly on the client side. The following requests in
the same async context does not let you set the response headers, and Tomcat
seem to give some default headers only. In addition, it also switches to
chunked transfer encoding because of missing content length. This results in
errors in clients trying to read the response from a Tomcat context. These
problems does not occur when using Jetty using the same Servlet 3.0 API's.

This problem was discovered while updating the BOSH plugin for the Vysper
project:
https://issues.apache.org/jira/browse/VYSPER-307

The same problem was observed in both Tomcat version 7.0.25 and 7.0.27.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 53112] Following asynchronous responses do not contain set response headers

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53112

--- Comment #2 from Stig Runar Vangen <st...@vangen.org> ---
Created attachment 28729
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28729&action=edit
Tomcat backend for XMPP connection

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 53112] Following asynchronous responses do not contain set response headers

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53112

--- Comment #4 from Stig Runar Vangen <st...@vangen.org> ---
My original report might not have been too clear. I'll try to clearify a bit.
I've added two attachments to this bug, logs that describes how both Jetty and
Tomcat handles the same code for handling XMPP requests.

First off, with "request" I meant several blocks of communication back and
forth between the server and client in the same HTTP request. Using async
communication, it is possible to leave the connection open, and let the client
and server talk to eachother at any time. Between each communication block, the
request is "ended" as a normal request would be, using the content-length
header to determine where the request and response ends. This is supported by
both Tomcat and Jetty. The difference is that while Jetty correctly hands out
the headers you configure every single time, this only works for the first
block for Tomcat.

The request would work as follows:

* Client connects to server to servlet defined with async support
* Client sends first request as normal
* Server responds with content-length
* AsyncContext.dispatch()
* Client reads response, leaves connection open
* Client sends new "request" in the same manner as last time
* Server again responds with content-length
* AsyncContext.dispatch()
* Client reads response, leaves connection open
...

This is how I've understood that this should work, and this is how Jetty
currently does it. It might be that I'm wrong, so please correct me.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 53112] Following asynchronous responses do not contain set response headers

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53112

--- Comment #3 from Stig Runar Vangen <st...@vangen.org> ---
Created attachment 28730
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28730&action=edit
Jetty backend for XMPP connection

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 53112] Following asynchronous responses do not contain set response headers

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53112

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|FIXED                       |INVALID

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 53112] Following asynchronous responses do not contain set response headers

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53112

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from Mark Thomas <ma...@apache.org> ---
This bug report does not make sense. There is only ever one request/response
per AsyncContext.

-- 
You are receiving this mail because:
You are the assignee for the bug.