Beispiel #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;
        }
Beispiel #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);
        }
Beispiel #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]};
        }