Hi all I try to program something like the Achilles 0.27 Proxy and so far I managed already quite a lot. But now I have a serious problem that needs your help to be solved. The code is the following public void AddPostData(HttpWebRequest request) { if (_postData != null && _postData.Length > 0) { // Set the length of the post data //MA:PostData.Length is is not allowed to be changed if we are in the intercept mode
// if(!SSLProxy.InterceptModeIsOn) // { request.ContentLength = _postData.Length; // } // Copy all post data to the request Stream requestStream = null; try { request.Pipelined=false; requestStream = request.GetRequestStream(); requestStream.Write(_postData, 0, _postData.Length); } /////in the main program the header of the HttpWebRequest instance that is handed over to request is manipuled (this means I use .Headers.clear() and Headers.add(,)). When I now watch what happens when I step through the commands, I see that before the execution of the request.GetRequestStream() the local variables like request.Expect have the new (manipulated) value. But after the execution of request.GetRequestStream() some variables like request.Expect change. Some observed changes are: request.DelegationFix={System.Net.DelegationFix} request.HaveWritten=true //was before false request.Expect="new,100-continue" //was before "new" Since the requestStream has now this "wrong" values, the header manipulation is not possible as wanted. I hope someone can tell me what I have to do that request is not changed when I call request.GetRequestStream(); Thank you in advance. Manuel