I need to access the response headers in a callback function as defined in section 14.4.1. I propose to extend TABLE 14-4 Event Data Payload like this:
responseHeaders | The response headers (XMLHttpRequest.getAllResponseHeaders()); Not present for "begin" event;
Alternatively, it might make sense to add the XMLHttpRequest (or equivalent) object itself available in the payload. This would allow for greater flexibility.
In the system environment of one of our applications a non-standard HTTP proxy is setting response headers we have to evaluate and handle in Ajax requests. The callback mechansim is perfect for this and we made a POC with Mojarra 2.1.1-b03 that our needs are satisfied by just extending the event data payload as described.