Hi,
I noticed that the implementation of ServerAdapter.getContentLength() is not the same for Tomcat and Jetty :
- Tomcat's one use response.getContentLength()
- Jetty's one use response.getContentCount()
Both expose response.getContentLength() and response.getContentCount(), and I understand that contentLength is the value from the response's header, while contentCount is the number of bytes actually written to the output stream.
So I think that ServerAdapter.getContentLength() should always use the underlying response.getContentLength(), and maybe we can add another method ServerAdapter.getContentCount() is people want to retrieve this value too.
What do you think ?
|