<commit_before>/*globals qq */
qq.azure = qq.azure || {};
qq.azure.util = qq.azure.util || (function() {
    "use strict";

    return {
        AZURE_PARAM_PREFIX: "x-ms-meta-",

        getParamsAsHeaders: function(params) {
            var headers = {};

            qq.each(params, function(name, val) {
                var headerName = qq.azure.util.AZURE_PARAM_PREFIX + name;

                if (qq.isFunction(val)) {
                    headers[headerName] = encodeURIComponent(String(val()));
                }
                else if (qq.isObject(val)) {
                    qq.extend(headers, qq.azure.util.getParamsAsHeaders(val));
                }
                else {
                    headers[headerName] = encodeURIComponent(String(val));<commit_msg>Add unprefixed Azure request headers support<commit_after>/*globals qq */
qq.azure = qq.azure || {};
qq.azure.util = qq.azure.util || (function() {
    "use strict";

    return {
        AZURE_PARAM_PREFIX: "x-ms-meta-",

        /** Create Prefixed request headers which are appropriate for Azure.
         *
         * If the request header is appropriate for Azure (e.g. Cache-Control) then pass
         * it along without a metadata prefix. For all other request header parameter names,
         * apply qq.azure.util.AZURE_PARAM_PREFIX before the name.
         *
         * @param name Name of the Request Header parameter to construct a (possibly) prefixed name.
         * @returns {String} A valid Request Header parameter name.
         */
        _getPrefixedParamName: function (name) {
            switch (name)
            {
                //
                // Valid request headers (not sent by fine-uploader) which should be returned as-is (case-sensitive)
                // see: https://msdn.microsoft.com/en-us/library/azure/dd179451.aspx
                //
                case "Cache-Control":
                case "Content-Disposition":
                case "Content-Encoding":
                case "Content-MD5":
                case "x-ms-blob-content-encoding":
                case "x-ms-blob-content-disposition":
                case "x-ms-blob-content-md5":
                case "x-ms-blob-cache-control":
                    return name;
                default:
                    return qq.azure.util.AZURE_PARAM_PREFIX + name;
            }
        },

        getParamsAsHeaders: function(params) {
            var headers = {};

            qq.each(params, function(name, val) {
                var headerName = qq.azure.util._getPrefixedParamName(name);

                if (qq.isFunction(val)) {
                    headers[headerName] = encodeURIComponent(String(val()));
                }
                else if (qq.isObject(val)) {
                    qq.extend(headers, qq.azure.util.getParamsAsHeaders(val));
                }
                else {
                    headers[headerName] = encodeURIComponent(String(val));
{'fraction_non_alphanumeric': 0.10975195378865103, 'fraction_numerical': 0.0027183146449201497, 'mean_word_length': 1.6030061892130858, 'pattern_counts': {'":': 8, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1966829', 'n_tokens_mistral': 825, 'n_tokens_neox': 772, 'n_words': 176}