예제 #1
0
 internal static void HandleHTTPError(Session oSession, SessionFlags flagViolation, bool bPoisonClientConnection, bool bPoisonServerConnection, string sMessage)
 {
     if (bPoisonClientConnection)
     {
         oSession.PoisonClientPipe();
     }
     if (bPoisonServerConnection)
     {
         oSession.PoisonServerPipe();
     }
     oSession.SetBitFlag(flagViolation, true);
     oSession["ui-backcolor"] = "LightYellow";
     Log.LogFormat("{0} - [#{1}] {2}", new object[] { "Fiddler.Network.ProtocolViolation", oSession.id.ToString(), sMessage });
     sMessage = "[ProtocolViolation] " + sMessage;
     if ((oSession["x-HTTPProtocol-Violation"] == null) || !oSession["x-HTTPProtocol-Violation"].Contains(sMessage))
     {
         Session session;
         (session = oSession)["x-HTTPProtocol-Violation"] = session["x-HTTPProtocol-Violation"] + sMessage;
     }
 }