sharepointhttpheaderrequest.servervariables

Sharepoint stripping HTTP Headers


I have a custom sharepoint app whose security model depends on an HTTP header. When a request is made from the mobile device, an http header called HTTP_RIM_DEVICE_EMAIL is added to each request. I grab the http header via the following method:

private static string GetValueFromHeader(string headerName)
        {
            HttpRequest Request = HttpContext.Current.Request;
            string returnValue = string.Empty;
            try
            {
                string[] val = Request.ServerVariables.GetValues(headerName);
                if (val.Length > 0)
                    returnValue = val[0];
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
            return returnValue;
        }

I pass in "HTTP RIM DEVICE EMAIL" and it's returning null. I have a regular asp.net 2.0 site on the same server and when I make a request to it through the blackberry, I see the header, but not when requesting the sharepoint site.

Is there a way to prevent sharepoint from stripping the http header that I need?


Solution

  • Actually, sharepoint doesn't strip HTTP Headers.