Hi,

In a chrome extension, i need to modify a particular http response
before it is actually handled by the browser.

If the real response is valid (with 200 as status), i need to modify
the  body. From my readings, i should be able to achieve so by
changing the "content-type" header from an http-on-examine-response
listener to something specific on which i registered a stream
converter.

If the response is not valid (e.g status 404), i would like to fake a
successful (status 200) response and provide my own response body.
However, the nsIHttpChannel provides a setResponseHeader for changing
a particular header, but nothing for changing the HTTP response
status: the field 'responseStatus' is readonly.

How should i proceed ? Is it at all possible ?

Marie

_______________________________________________
dev-tech-network mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-network

Reply via email to