Esempio n. 1
0
        public void Start(string szURL, IInternetProtocolSink Sink, IInternetBindInfo pOIBindInfo, uint grfPI, uint dwReserved)
        {
            //System.Diagnostics.Debugger.Launch();
            AspNetRequestData RequestData = new AspNetRequestData(Stream);

            try
            {
                BINDINFO BindInfo = GetBindInfo(pOIBindInfo);
                RequestData.Verb     = GetVerb(BindInfo);
                RequestData.PostData = GetPostData(BindInfo);

                IHttpNegotiate Negotiate = GetHttpNegotiate(Sink);
                string         strRequestHeaders;
                Negotiate.BeginningTransaction(szURL, string.Empty, 0, out strRequestHeaders);
                RequestData.SetRequestHeaders(strRequestHeaders);

                ProcessRequest(RequestData, szURL);

                string strNewResponseHeaders;
                Negotiate.OnResponse(200, RequestData.GetResponseHeaders(), strRequestHeaders, out strNewResponseHeaders);

                //This must be the size of the buffer.
                Sink.ReportData(BSCF.BSCF_LASTDATANOTIFICATION, (uint)Stream.Length, (uint)Stream.Length);

                Sink.ReportResult(0, RequestData.Status, RequestData.StatusDescription);
            }
            catch (Exception e)
            {
                WriteBasicMessage(e.Message + "<hr>" + e.StackTrace, "Error");
            }
        }
Esempio n. 2
0
        public void ProcessRequest(AspNetRequestData RequestData, string szURL)
        {
            int loc = szURL.IndexOf(':');

            if (loc < 0)
            {
                WriteBasicMessage("Invalid protocol format.  Must contain a colon (:)", "Error Page");
                return;
            }

            string Url = szURL.Remove(0, loc + 1).Replace("/", "\\");

            if (Directory.Exists(Url))
            {
                DirectoryBrowser(Url);
                return;
            }

            RequestData.Url = Url;
            AspNetHost Host = new AspNetHost();

            Host.process(RequestData);
        }
Esempio n. 3
0
 public void SendRequest(AspNetRequestData RequestData)
 {
     Debug.WriteLine("Bin:" + HttpRuntime.BinDirectory);
     Debug.WriteLine("AppPath:" + HttpRuntime.AppDomainAppPath);
     HttpRuntime.ProcessRequest(new AspNetRequest(RequestData));
 }
Esempio n. 4
0
 public void process(AspNetRequestData RequestData)
 {
     GetBridge(RequestData.Url).SendRequest(RequestData);
 }
Esempio n. 5
0
 public AspNetRequest(AspNetRequestData requestData) :
     base(requestData.Page, requestData.QueryString, TextWriter.Null)
 {
     _RequestData = requestData;
 }