DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35297>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35297

           Summary: [PATCH] Chunked transfer encoding for IIS JK/ISAPI
           Product: Tomcat 5
           Version: 5.5.9
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Native:JK
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: [EMAIL PROTECTED]


This patch adds chunked encoding for IIS responses - i.e. Transfer-Encoding:
chunked responses for HTTP/1.1 clients - allowing IIS to maintain persistent
connections to HTTP/1.1 clients through the ISAPI redirector.

IIS hands a lot of the responsibility for HTTP protocol handling to the ISAPI
extension - Apache is sooo much nicer to deal with.
IIS will keep connections alive if there is a Content-Length specified in the
request, but won't do transfer encoding for requests that don't like Apache 
does.

Contents of the patch:
- Added 'enable_chunked_encoding' param (bool) to enable chunked encoding
(default is disabled)
- Modified isapi_private_data_t to track whether chunked encoding is enabled per
request
- Modified start_response to:
   - Detect HTTP 1.1 clients and enable chunked encoding for the response (if
the Tomcat response hasn't already precluded that)
   - Determine whether IIS should be told to keep the connection alive (IIS
makes us manage this as well if we want to have the ability to keep connections)
   - Set the Transfer-Encoding: chunked header when used
   - Use the HSE_SEND_HEADER_EX_INFO/ServerSupportFunction API to allow us to
tell IIS to keep the connections open
- Factored the WriteClient calls into a new function (for the new write())
- Added support in write() for writing a chunked encoded response chunk
- Added a flush hook for IIS (with flush_packets false) to allow the chunked
encoded terminator (the 0 chunk) to be written on response completion

I'd consider the chunked encoding experimental at the moment - we're beta
testing at the moment - which is why it's disabled by default.
We've run this against fairly complex web applications, with a mix of jsp, htm,
xml, Content-Length, no Content-Length and some Connection: close behaviour, IE,
Firefox etc.
All seems to work fine at the moment - chunked encoding isn't that complex -
though IE does get confused if there are non-chunk-encoded files in the cache.
The only reported failure is when using Fiddler with an HTTP/1.0 client, though
I suspect this is Fiddlers problem (it can't handle 1.0 to the unpatched 
connector).
Straight HTTP/1.0 from IE works fine.

It'd be great to get this into the codebase and have people beta test it to see
if if any problems show up.
Any problems are likely to be the result of incorrect negotiation of keep-alive
or incorrect detection of responses from Tomcat that preclude using chunked
encoding.

cheers
tim

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

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

Reply via email to