Пример #1
0
        internal static unsafe HTTP_VERB GetKnownVerb(IntPtr memoryBlob, IntPtr originalAddress)
        {
            // Return value.
            HTTP_VERB verb = HTTP_VERB.HttpVerbUnknown;

            HTTP_REQUEST *request = (HTTP_REQUEST *)memoryBlob.ToPointer();

            if ((int)request->Verb > (int)HTTP_VERB.HttpVerbUnparsed && (int)request->Verb < (int)HTTP_VERB.HttpVerbMaximum)
            {
                verb = request->Verb;
            }

            return(verb);
        }
Пример #2
0
        internal static unsafe HTTP_VERB GetKnownVerb(byte[] memoryBlob, IntPtr originalAddress)
        {
            NetEventSource.Enter(null);

            // Return value.
            HTTP_VERB verb = HTTP_VERB.HttpVerbUnknown;

            fixed(byte *pMemoryBlob = memoryBlob)
            {
                HTTP_REQUEST *request = (HTTP_REQUEST *)pMemoryBlob;

                if ((int)request->Verb > (int)HTTP_VERB.HttpVerbUnparsed && (int)request->Verb < (int)HTTP_VERB.HttpVerbMaximum)
                {
                    verb = request->Verb;
                }
            }

            NetEventSource.Exit(null);
            return(verb);
        }
Пример #3
0
        internal static HTTP_VERB GetKnownVerb(byte[] memoryBlob, IntPtr originalAddress)
        {
            GlobalLog.Enter("HttpApi::GetKnownVerb()");

            // Return value.
            HTTP_VERB verb = HTTP_VERB.HttpVerbUnknown;

            fixed(byte *pMemoryBlob = memoryBlob)
            {
                HTTP_REQUEST *request = (HTTP_REQUEST *)pMemoryBlob;

                if ((int)request->Verb > (int)HTTP_VERB.HttpVerbUnparsed && (int)request->Verb < (int)HTTP_VERB.HttpVerbMaximum)
                {
                    verb = request->Verb;
                }
            }

            GlobalLog.Leave("HttpApi::GetKnownVerb()");
            return(verb);
        }
Пример #4
0
 public Endpoint(string url, HTTP_VERB verb)
 {
     UrlAction = url;
     Url       = BASE_URL + url;
     Verb      = verb;
 }