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)); }
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()); }
public override string GetUri(long requestId) { return(MainApp.GetNginxMonoRequestInfo(requestId.ToPointer()).uri); }
public override string GetQueryString(long requestId) { return(MainApp.GetNginxMonoRequestInfo(requestId.ToPointer()).args); }
public override string GetHttpProtocol(long requestId) { return(MainApp.GetNginxMonoRequestInfo(requestId.ToPointer()).http_protocol); }
public override string GetMethodName(long requestId) { return(MainApp.GetNginxMonoRequestInfo(requestId.ToPointer()).method_name); }