public static NginxBlackRequest RequestFromNginxRequest(IntPtr nginx_request)
    {
        var info = MainApp.GetNginxMonoRequestInfo(nginx_request);

        /*Console.Error.WriteLine ("Headers Count = {0} ", info.headers_count);
         * NginxMonoHeader[] xheaders = null;
         * MainApp.GetNginxHeaders (nginx_request, out xheaders, info.headers_count);
         *
         * NginxMonoHeader[] headers = new NginxMonoHeader[info.headers_count];
         * for (int i = 0; i < info.headers_count; i++) {
         *      headers[i] = xheaders[i];
         * }
         */
        return(new NginxBlackRequest(nginx_request, info));
    }
Beispiel #2
0
    internal static RequestHeader[] GetRequestHeaders(IntPtr nginx_request)
    {
        var info = MainApp.GetNginxMonoRequestInfo(nginx_request);

        Console.Error.WriteLine("Headers Count = {0} ", info.headers_count);
        NginxMonoHeader[] xheaders = null;
        MainApp.GetNginxHeaders(nginx_request, out xheaders, info.headers_count);

        NginxMonoHeader[] headers = new NginxMonoHeader[info.headers_count];
        for (int i = 0; i < info.headers_count; i++)
        {
            headers[i] = xheaders[i];
        }
        return((from h in headers
                select new RequestHeader {
            Key = h.Key, Value = h.Value
        }).ToArray());
    }
Beispiel #3
0
 public override string GetUri(long requestId)
 {
     return(MainApp.GetNginxMonoRequestInfo(requestId.ToPointer()).uri);
 }
Beispiel #4
0
 public override string GetQueryString(long requestId)
 {
     return(MainApp.GetNginxMonoRequestInfo(requestId.ToPointer()).args);
 }
Beispiel #5
0
 public override string GetHttpProtocol(long requestId)
 {
     return(MainApp.GetNginxMonoRequestInfo(requestId.ToPointer()).http_protocol);
 }
Beispiel #6
0
 public override string GetMethodName(long requestId)
 {
     return(MainApp.GetNginxMonoRequestInfo(requestId.ToPointer()).method_name);
 }