Azure文件存储错误:不支持条件标题 [英] Azure File Storage Error: Condition Headers Are Not Supported

查看:83
本文介绍了Azure文件存储错误:不支持条件标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当尝试直接从Azure文件存储将PDF文件下载到浏览器时,出现此错误:

When attempting to download a PDF file to a browser directly from Azure File Storage I get this error:

<Error>
    <Code>ConditionHeadersNotSupported</Code>
        <Message>
            Condition headers are not supported. RequestId:a84ee68e-   001a-001b-4223-bff5e7000000 Time:2017-04-27T06:57:22.2002199Z
        </Message>
</Error>

边缘:空白页或带有冻结加载指示器的空白页.

Edge: Blank page or blank page with frozen loading indicator.

FireFox:第二次,显示下载文件的对话框.

FireFox: Second time, shows dialog to download file.

Chrome浏览器:空白页,或者选中了PDF文档在默认的PDF查看器应用程序中打开PDF文件"设置时,显示下载文件的对话框.

Chrome: Blank page or When PDF Documents "Open PDF files in default PDF viewer application" setting is checked, shows dialog to download file.

IE:显示下载文件的对话框.

IE: Shows dialog to download file.

Safari:显示PDF.

Safari: Displays PDF.

行为可以在这里看到:

The behavior can be seen here:
https://peachstatepca.file.core.windows.net/content/newsletters/PresseApril2017.pdf?sv=2016-05-31&sr=f&sig=rkQEmY6IWXZqcgvhmm00gLQ%2FCZEq6nsH95S3aP9T72A%3D&se=2017-05-01T11:46:18Z&sp=r

推荐答案

Azure文件存储错误:不支持条件标题

Azure File Storage Error: Condition Headers Are Not Supported

由于新的Edge浏览器将不对ActiveX插件提供任何支持.因此,Acrobat/Reader插件不适用于Edge.我们可以获取有关

如果我们尝试以专用模式和开发模式通过Edge下载PDF文件,则会收到错误消息"某些阻止打开此PDF文件",并且还可以知道Edge浏览器已发送2个要求.还有第二个请求,其标题为"If-range".根据Azure文件存储获取文件API ,没有指定支持的条件标题If-Range.我还找到了关于边缘浏览器的类似的问题

If we try to download the PDF file with Edge in the private and develop mode, we can get the error message "Something’s keeping this PDF from opening" and also can know that edge browser has sent 2 requests. And second request with Header 'If-range'. According the Azure file storage Get File API, there is no specifying Conditional Headers If-Range supported. I also find a similar issue about edge browser.

我也在Firefox和Chrome中进行了测试,然后只收到了1个请求.

I also test in the Firefox and Chrome, then just get the 1 request.

注意:对于Azure Blob服务,可以从边缘浏览器正确打开pdf文件.作为Blob 获取支持成功操作的Blob API 读取完整的Blob会返回状态码200(确定),并且 成功读取指定范围的操作将返回状态码206(部分内容).

Note: For Azure Blob Service, the pdf file can be opened correctly from the edge browser. As Blob Get Blob API that supports a successful operation to read the full blob returns status code 200 (OK) and a successful operation to read a specified range returns status code 206 (Partial Content).

这篇关于Azure文件存储错误:不支持条件标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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