简体   繁体   English

无法使用Android手机从https地址下载文件

[英]Cannot download file from a https address using android phone

  1. I set up an Apache server which accept a HTTPs connection (on my local) 我设置了一个接受HTTPs连接的Apache server (在本地)
  2. Create a very simple html file which contains this code: <a href="Menu.doc">download</a> 创建一个非常简单的HTML文件,其中包含以下代码: <a href="Menu.doc">download</a>
  3. Using PC, go to address ' https://localhost ', click on the link, I can download the file "Menu.doc". 使用PC,转到地址“ https:// localhost ”,单击链接,我可以下载文件“ Menu.doc”。
  4. But when using native web browser or even chrome on an android phone, I can NOT download this file. 但是,当在Android手机上使用本机网络浏览器甚至Chrome时,我无法下载此文件。 I can see the "starting download" message, but then it "hang on" with state "in progress" forever. 我可以看到“正在开始下载”消息,但是它永远“挂起”,状态为“进行中”。
  5. If I choose a download manager app (on my phone) such as ESdownloader, I can download it. 如果我选择了下载管理器应用程序(在手机上),例如ESdownloader,则可以下载它。
  6. When I try downloading a file from a HTTPS address ( https://cloudsecurityalliance.org/csaguide.pdf ) using this phone, everything is OK 当我尝试使用此手机从HTTPS地址( https://cloudsecurityalliance.org/csaguide.pdf )下载文件时,一切正常

Why and how to fix it? 为什么以及如何解决? Maybe I need some config to my server or some code (PHP, Java) on the server side to handle the download request? 也许我需要对服务器进行一些配置或服务器端的一些代码(PHP,Java)来处理下载请求?

You https server is a certified authority signed or self-signed server? 您的https服务器是认证机构签名的服务器还是自签名的服务器? Maybe the problem is with the certificate. 也许问题出在证书上。 Please read this thread 请阅读此主题

https://code.google.com/p/android/issues/detail?id=5851 https://code.google.com/p/android/issues/detail?id=5851

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM