selfHandleResponse: true => response broken
Created by: HugoMuller
I'm trying to manually handle the response with { selfHandleResponse: true }
, but, as the doc says:
none of the webOutgoing passes are called
And that prevents me from correctly sending response.
This is the code causing the problem:
// passes/web-incoming.js
if(!res.headersSent && !options.selfHandleResponse) {
for(var i=0; i < web_o.length; i++) {
if(web_o[i](req, res, proxyRes, options)) { break; }
}
}
Doing this, fixes it:
if(!res.headersSent) {
for(var i=0; i < web_o.length; i++) {
if(web_o[i](req, res, proxyRes, options)) { break; }
}
}
I need to call the webOutgoing passes and do some extra stuff. But I can't.
Maybe you can expose passes/web-outgoing
, or add a flag like callWebOutgoing
to let users call them if they want to.