FiddlerScript: use utilIssueRequest to resend a deep copied session caused “HTTP/1.1 0 HEADERS NOT SET” appended to request body

Clash Royale CLAN TAG#URR8PPP
FiddlerScript: use utilIssueRequest to resend a deep copied session caused “HTTP/1.1 0 HEADERS NOT SET” appended to request body
Basically, the idea is to make a copy of a session in OnBeforeRequest, and modify this newly copied session, e. g. removing some headers, then send the modified request without affecting the original session.
var newSession = new Session(oSession) ;
newSession.oRequest.headers.remove("User-Agent");
FiddlerObject.utilIssueRequest(newSession) ;
this will resend the request with a request body HTTP/1.1 0 HEADERS NOT SET
I understand using oProxy.sendRequest can resend a request, but you have to manually construct the headers and session data etc. which is a lot of manual work.
can anyone help to explain, thanks.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
It seems that this constructor Session(toDeepCopy: Session) is a bit pointless after all. Check the answer to stackoverflow.com/questions/25360950/…, it does the job.
– R2-D2
Aug 17 at 9:19