You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have noticed, that SendApiProblemResponseListener is modifying the response content AFTER sending headers (if display_exceptions is enabled).
I have a Content-Length header based on response content but this header is now responding a wrong length as it doesn't know if the content gets modified afterwords.
On the same time I'm automatically pretty printing the response if the request contains header X-Pretty: 1 but this will also be ignored as the content gets rewritten in this case.
What is the reason to overwrite HttpResponseSender instead of listening on EVENT_FINISH?
I have noticed, that
SendApiProblemResponseListener
is modifying the response content AFTER sending headers (ifdisplay_exceptions
is enabled).I have a
Content-Length
header based on response content but this header is now responding a wrong length as it doesn't know if the content gets modified afterwords.On the same time I'm automatically pretty printing the response if the request contains header
X-Pretty: 1
but this will also be ignored as the content gets rewritten in this case.What is the reason to overwrite
HttpResponseSender
instead of listening onEVENT_FINISH
?This is my broken code:
Originally posted by @marc-mabe at zfcampus/zf-api-problem#54
The text was updated successfully, but these errors were encountered: