示例#1
0
 public static string CanonicalizeHttpRequest(RequestContext requestContext, NephosUriComponents uriComponents, bool isFileService = false)
 {
     if (!MessageCanonicalizer.IsVersionBeforeSep09(requestContext.RequestHeaders))
     {
         return(MessageCanonicalizer.CanonicalizeHttpRequestVer1(uriComponents, requestContext, isFileService));
     }
     return(MessageCanonicalizer.CanonicalizeHttpRequestDefault(requestContext.RequestUrl, uriComponents, requestContext.HttpMethod, requestContext.RequestContentType, requestContext.RequestHeaders, isFileService, requestContext.RequestRawUrlString));
 }
示例#2
0
 public static string CanonicalizeHttpRequest(Uri uri, NephosUriComponents uriComponents, string method, NameValueCollection headers, bool multipleConditionalHeadersEnabled = false)
 {
     if (!MessageCanonicalizer.IsVersionBeforeSep09(headers["x-ms-version"]))
     {
         return(MessageCanonicalizer.CanonicalizeHttpRequestVer1(uri, uriComponents, method, headers, false, null, multipleConditionalHeadersEnabled));
     }
     return(MessageCanonicalizer.CanonicalizeHttpRequestDefault(uri, uriComponents, method, headers["Content-Type"], headers, false, null));
 }
示例#3
0
 public static string CanonicalizeHttpRequest(HttpWebRequest request, NephosUriComponents uriComponents)
 {
     if (!MessageCanonicalizer.IsVersionBeforeSep09(request.Headers))
     {
         return(MessageCanonicalizer.CanonicalizeHttpRequestVer1(uriComponents, request));
     }
     return(MessageCanonicalizer.CanonicalizeHttpRequestDefault(request.Address, uriComponents, request.Method, request.ContentType, request.Headers, false, null));
 }
示例#4
0
 public static bool IsVersionBeforeSep09(NameValueCollection requestHeaders)
 {
     return(MessageCanonicalizer.IsVersionBeforeSep09(requestHeaders["x-ms-version"]));
 }