Skip to content

Conversation

@jbescos
Copy link
Member

@jbescos jbescos commented Jun 23, 2020

Adding a new example that tests JSP is GZipped with no issues.

Recently an issue was found in one servlet container, and this demonstrates the issue is not related to jersey.

Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
@jbescos
Copy link
Member Author

jbescos commented Jun 25, 2020

I have to move it to servlet 4.x because 2.5 is going to be deprecated.

Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
@jbescos
Copy link
Member Author

jbescos commented Jun 26, 2020

@senivam @jansupol what is your opinion on the commit:
7676148

I found that in Weblogic, after the method HttpServletResponse#flushBuffer is invoked, it will refuse to add new headers in the response. It is possible that in other Servlet implementations it behaves similar. It is not the case of Jetty because I tested it is fine.

I think it is possible to fix it in Weblogic instead of Jersey but probably it makes more sense to do this in Jersey because other implementations could also make problems. Let me know if you think in other way.

Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
@senivam
Copy link
Contributor

senivam commented Jun 29, 2020

@jbescos - just a question - why you do not use flush() method of the PrintWriter which actually wraps responseStream?

@jbescos
Copy link
Member Author

jbescos commented Jun 29, 2020

@jbescos - just a question - why you do not use flush() method of the PrintWriter which actually wraps responseStream?

I already tried it, but the problem is Weblogic creates internally a ServletOutputStream that wraps the original (weblogic.servlet.internal.ServletOutputStreamImpl). This wrapper will not accept more headers after flush.

Then when ServletOutputStream#flush is executed, it is too late and it reach the status of not accepting more headers.

Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
Copy link
Contributor

@senivam senivam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@senivam senivam requested a review from Verdent July 13, 2020 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants