Allow modification of response in CefResourceRequestHandler::OnResourceResponse
Original report by me.
The CefResponse object is currently read-only in the CefResourceRequestHandler::OnResourceResponse callback. It could be useful in some cases to allow modification of this object. For example, adding the "Content-Disposition: attachment; filename=download.pdf" header would trigger download of a PDF file instead of displaying in the PDF viewer extension.
Original comment by Alex Maitland (Bitbucket: a-maitland).
Any thoughts on what would be involved in implementing this?
Headers can be modified in InterceptedRequest::HandleResponseOrRedirectHeaders, so it just needs some plumbing to support the modification via the CEF API.
Headers can be modified in
InterceptedRequest::HandleResponseOrRedirectHeaders, so it just needs some plumbing to support the modification via the CEF API.
I tried modifying headers with AddHeader/RemoveHeader in InterceptedRequest::HandleResponseOrRedirectHeaders but the changes didn't reflect.
@magreenblatt - has there been any more thought on implementing this going forward? This would be very helpful for us as we have a use case that would benefit from this.