private static void _returnRootCert(Session oS) { oS.utilCreateResponseAndBypassServer(); oS.oResponse.headers["Connection"] = "close"; oS.oResponse.headers["Cache-Control"] = "max-age=0"; byte[] buffer = CertMaker.getRootCertBytes(); if (buffer != null) { oS.oResponse.headers["Content-Type"] = "application/x-x509-ca-cert"; oS.responseBodyBytes = buffer; oS.oResponse.headers["Content-Length"] = oS.responseBodyBytes.Length.ToString(); } else { oS.responseCode = 0x194; oS.oResponse.headers["Content-Type"] = "text/html; charset=UTF-8"; oS.utilSetResponseBody("No root certificate was found. Have you enabled HTTPS traffic decryption in Fiddler yet?".PadRight(0x200, ' ')); } FiddlerApplication.DoResponseHeadersAvailable(oS); oS.ReturnResponse(false); }