Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
StringHttpMessageConverter flush out response immediately before execute posthandler [SPR-16046] #20595
the problem is related
this problem caused all subsequence handlers like posthandler got executed after response return to the client.
the repro steps should be easy, just create a controller with
Elizabeth Hartoog commented
I work with Eric, and I was the one having the issue. I wrote this email to my fellow developers to inform them off the issue:
There is a bug in the spring framework that causes responses using
So if you have a request mapping that fits this description, be aware that any cookies or response changes made in the posthandler will not be executed until after the response is already returned to the client. Session updates will still execute and will probably still work as expected.
Eric uses Spring 4. I use Spring 3 MVC.
Brian Clozel commented
Thanks for reaching out!
As explained in the
In the case of
Your only choice here is to consider a different infrastructure, like using a
Feel free to comment here with specifics about your use case so that we can discuss your best options here.