报告下载问题&请求解决方案 [英] report download problem & request for solution

查看:77
本文介绍了报告下载问题&请求解决方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在.NET中下载报告效果不佳。如果您尝试

Downloading reports in .NET doesn't work very well. If you try

    HttpWebRequest request =(HttpWebRequest)WebRequest.Create(downloadUrl);

    request.Headers.Add(HttpRequestHeader.AcceptEncoding," gzip,deflate");

    request.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;

    HttpWebRequest request = (HttpWebRequest) WebRequest.Create(downloadUrl);
    request.Headers.Add(HttpRequestHeader.AcceptEncoding, "gzip,deflate");
    request.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;

你会发现响应没有被压缩。

You'll find that the response is not ucompressed.

如果你下载并检查自己解压缩:

If you download and check yourself to decompress:

        if(response.ContentEncoding.ToLower()。包含("gzip"))

            s2 = new GZipStream(s2,CompressionMode.Decompress);

        if (response.ContentEncoding.ToLower().Contains("gzip"))
            s2 = new GZipStream(s2, CompressionMode.Decompress);

你会发现response.ContentEncoding为空。

You'll find that response.ContentEncoding is empty.

这可以修复吗以便HTTP响应流可以解压缩?

Can this please be fixed so that the HTTP response stream can be uncompressed?

谢谢







推荐答案

您好Chris,

Hi Chris,

我们目前支持ZIP文件,但不支持GZIP压缩格式。如果您有任何问题,请告诉我们。

We currently support ZIP file, but not GZIP compressed format. Please let us know if you have any questions.

谢谢

Ravi


这篇关于报告下载问题&请求解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆