Esempio n. 1
0
        public CacheResponse(IResponse response)
        {
            response.ThrowIfNull("response");

            _statusCode = response.StatusCode;
            _contentType = response.ContentType;
            _charset = response.Charset ?? DefaultCharset;
            _contentEncoding = response.ContentEncoding ?? _defaultContentEncoding;
            _headers = response.Headers.Select(arg => arg.Clone()).ToArray();
            _headerEncoding = response.HeaderEncoding ?? _defaultHeaderEncoding;
            _cookies = response.Cookies.Select(arg => arg.Clone()).ToArray();
            _cachePolicy = response.CachePolicy.Clone();
            _content = response.GetContent();
        }