Beispiel #1
0
 public override void EndOfRequest()
 {
     //Console.WriteLine ("notification");
     if (VirtHost.RunningOnMono())
     {
         mtx.Set();
     }
 }
Beispiel #2
0
        public String [] ProcessRequest_int(String page, String post, String parameters,
                                            String in_headers, String client_ip, String server_port,
                                            String localhost_name, String virtualDir, String physicalDir, Object odbcPort)
        {
            String [] ret_str = new String [3];
            try {
                StringWriter        all_text = new StringWriter();
                SimpleWorkerRequest req      =
                    (SimpleWorkerRequest) new VirtSimpleWorkerRequest(page, post, parameters, in_headers,
                                                                      client_ip, server_port, localhost_name,
                                                                      virtualDir, physicalDir, all_text);
                //Console.WriteLine (String.Format ("FilePath=[{0}] FilePathTranslated=[{1}]", req.GetFilePath(), req.GetFilePathTranslated()));
                //Console.WriteLine (String.Format ("AppPath=[{0}] AppPathTranslated=[{1}]", req.GetAppPath(), req.GetAppPathTranslated()));
                //Console.WriteLine (String.Format ("HttpVerbName=[{0}] HttpVersion=[{1}]", req.GetHttpVerbName(), req.GetHttpVersion()));
                //Console.WriteLine (String.Format ("parameters=[{0}] GetQueryString=[{1}] GetQueryStringRawBytes=[{2}] HasEntityBody=[{3}]", parameters, req.GetQueryString (), req.GetQueryStringRawBytes(), req.HasEntityBody()));
                AppDomain.CurrentDomain.SetData("OpenLink.Virtuoso.InProcessPort", odbcPort);
                HttpRuntime.ProcessRequest(req);
                if (VirtHost.RunningOnMono())
                {
                    ((VirtSimpleWorkerRequest)req).mtx.WaitOne();
                }
                ret_str [0] = (String)all_text.ToString().Clone();
                ret_str [1] = (String)((VirtSimpleWorkerRequest)req).out_headers_get().Clone();
                ret_str [2] = (String)((VirtSimpleWorkerRequest)req).out_status_get().Clone();
//	    HttpRuntime.Close();
//          Console.WriteLine (ret_str[2]);
//          Console.WriteLine (ret_str[1]);
//          Console.WriteLine (ret_str[0]);
                return(ret_str);
            } catch (Exception e) {
                //Console.WriteLine ("xx");
                //Console.WriteLine (e);
                ret_str [0] = e.ToString();
                ret_str [1] = "";
                ret_str [2] = "500 Internal Hosting error";
                return(ret_str);
            }
        }