Y's note

Web技術・プロダクトマネジメント・そして経営について

本ブログの更新を停止しており、今後は下記Noteに記載していきます。
https://note.com/yutakikuchi/

Android端末のOpenSSL経由でファイルダウンロードができない問題

問題詳細

OpenSSLを使って立ちあげたサーバに設置したファイルに対してAndroidのブラウザからアクセスしても全くダウンロードが始まらない現象が起きていた。サーバのレスポンスとしてのContent-Typeやその他headerについても確認しても特に問題なさそうだったので、試しにhttpでアクセスしてみたらうまくダウンロードできた。httpsの何が原因なのかが分からないが、androidはオレオレ認証を認めてくれないようだ。別にOpenSSLぐらいのアクセスぐらい認めてくれてもいいのに、iPhoneは例外承認すればダウンロードさせてくれますよ。時間があればAndroidブラウザソースを追いたいと思ったが、既にIssueTicketが発行されていたので、そのリンクと内容を張っておく。

Issue 3492
※原文の一部を下に引用

I tried to download a file from a password protected page (AuthType Basic),
which is accessed over https. Accessing the page itself with the browser
works without problems. But when I try to download files from the page, the
Download Manager shortly displays "Starting download..." and the switches
to and keeps saying "Waiting for data connection...". The download is never
starting.

(略)

The server uses a certificate, I created and signed with my own CA
certifiacte. This may also be a cause for this issue.