示例#1
0
        public HeaderHash Merge(Hash other)
        {
            var mergedHash = new HeaderHash();
            Each(pair => mergedHash[pair.Key] = pair.Value);
            other.Each(pair => mergedHash[pair.Key] = pair.Value);

            return mergedHash;
        }
示例#2
0
        public HeaderHash Merge(Hash other)
        {
            var mergedHash = new HeaderHash();

            Each(pair => mergedHash[pair.Key]       = pair.Value);
            other.Each(pair => mergedHash[pair.Key] = pair.Value);

            return(mergedHash);
        }
示例#3
0
        public dynamic[] Call(IDictionary<string, dynamic> environment)
        {
            var response = _app.Call(environment);
            var headers = new HeaderHash(response[1]);

            if (!headers.ContainsKey("Content-Type") || headers["Content-Type"] == null)
            {
                headers["Content-Type"] = _contentType;
            }

            return new[] {response[0], headers, response[2]};
        }