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)); }
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)); }
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)); }
public static string CanonicalizeHttpRequestVer1(NephosUriComponents uriComponents, HttpWebRequest request) { string canonicalizedHeaderValue; Uri address = request.Address; NephosUriComponents nephosUriComponent = uriComponents; string method = request.Method; string str = MessageCanonicalizer.GetCanonicalizedHeaderValue(request.Headers, "Content-Encoding"); string canonicalizedHeaderValue1 = MessageCanonicalizer.GetCanonicalizedHeaderValue(request.Headers, "Content-Language"); if (request.Headers["Content-Length"] != null) { canonicalizedHeaderValue = MessageCanonicalizer.GetCanonicalizedHeaderValue(request.Headers, "Content-Length"); } else { canonicalizedHeaderValue = (request.ContentLength < (long)0 ? string.Empty : Convert.ToString(request.ContentLength)); } return(MessageCanonicalizer.CanonicalizeHttpRequestVer1(address, nephosUriComponent, method, str, canonicalizedHeaderValue1, canonicalizedHeaderValue, MessageCanonicalizer.GetCanonicalizedHeaderValue(request.Headers, "Content-MD5"), (request.Headers["Content-Type"] != null ? MessageCanonicalizer.GetCanonicalizedHeaderValue(request.Headers, "Content-Type") : request.ContentType), MessageCanonicalizer.GetCanonicalizedHeaderValue(request.Headers, "Date"), MessageCanonicalizer.GetCanonicalizedHeaderValue(request.Headers, "If-Modified-Since"), MessageCanonicalizer.GetCanonicalizedHeaderValue(request.Headers, "If-Match"), MessageCanonicalizer.GetCanonicalizedHeaderValue(request.Headers, "If-None-Match"), MessageCanonicalizer.GetCanonicalizedHeaderValue(request.Headers, "If-Unmodified-Since"), MessageCanonicalizer.GetCanonicalizedHeaderValue(request.Headers, "Range"), request.Headers, false, null, false)); }
public static string CanonicalizeHttpRequestVer1(Uri uri, NephosUriComponents uriComponents, string method, NameValueCollection headers, bool isFileService = false, string rawUrl = null, bool multipleConditionalHeadersEnabled = false) { return(MessageCanonicalizer.CanonicalizeHttpRequestVer1(uri, uriComponents, method, MessageCanonicalizer.GetCanonicalizedHeaderValueVer1(headers, "Content-Encoding", multipleConditionalHeadersEnabled), MessageCanonicalizer.GetCanonicalizedHeaderValueVer1(headers, "Content-Language", multipleConditionalHeadersEnabled), MessageCanonicalizer.GetCanonicalizedHeaderValueVer1(headers, "Content-Length", multipleConditionalHeadersEnabled), MessageCanonicalizer.GetCanonicalizedHeaderValueVer1(headers, "Content-MD5", multipleConditionalHeadersEnabled), MessageCanonicalizer.GetCanonicalizedHeaderValueVer1(headers, "Content-Type", multipleConditionalHeadersEnabled), MessageCanonicalizer.GetCanonicalizedHeaderValueVer1(headers, "Date", multipleConditionalHeadersEnabled), MessageCanonicalizer.GetCanonicalizedHeaderValueVer1(headers, "If-Modified-Since", multipleConditionalHeadersEnabled), MessageCanonicalizer.GetCanonicalizedHeaderValueVer1(headers, "If-Match", multipleConditionalHeadersEnabled), MessageCanonicalizer.GetCanonicalizedHeaderValueVer1(headers, "If-None-Match", multipleConditionalHeadersEnabled), MessageCanonicalizer.GetCanonicalizedHeaderValueVer1(headers, "If-Unmodified-Since", multipleConditionalHeadersEnabled), MessageCanonicalizer.GetCanonicalizedHeaderValueVer1(headers, "Range", multipleConditionalHeadersEnabled), headers, isFileService, rawUrl, multipleConditionalHeadersEnabled)); }
public static string CanonicalizeHttpRequestVer1(NephosUriComponents uriComponents, RequestContext requestContext, bool isFileService = false) { return(MessageCanonicalizer.CanonicalizeHttpRequestVer1(requestContext.RequestUrl, uriComponents, requestContext.HttpMethod, requestContext.RequestHeaders, isFileService, requestContext.RequestRawUrlString, requestContext.MultipleConditionalHeadersEnabled)); }