zberentey/liferay-portal — pull request #155 by vilmospapp (2012-10-23 11:25:00+00:00)
Title: [TECHNICAL SUPPORT] LPS-30626 Moving header additions to processServicePre from processServicePost to handle response.flushBuffer() calls

Hi Zsolt,

This issue is related to Liferay Sync and it's hard to test on trunk, but the basic problem is that if we turn off StripFilter, we will call ServletResponseUtil.write() where response.flushBuffer() is called, hence the

Based on the API http://docs.oracle.com/javaee/6/api/javax/servlet/ServletResponse.html#flushBuffer%28%29 after the flushBuffer() call the response is commited and status code and headers are written. What is not the case in this situation as we add the "Liferay-Portal" header in the processServicePost() method.

Hence Sync cannot read the header this way and cannot work.

Regards,
Vilmos