User-Agent に MSIE が含まれていた場合の動作について、filename="..."
と filename*=utf-8''...
が両方とも SJIS でエンコードされた状態になっています。
このような場合も filename*=utf-8''...
には常に UTF-8 でエンコードされたファイル名が入るように修正して下さい。
(IE9, IE10 は User-Agent に MSIE を含みますが、filename*=utf-8''...
があればこちらが優先的に使われます)
通常のレスポンス:
$ curl -v -b 'OpenPNE_pc_backend=a856c308144700966e799801ba0b082e' 'https://s.upsilo.net/master/pc_backend.php/monitoring/fileDownload/id/3'
> GET /master/pc_backend.php/monitoring/fileDownload/id/3 HTTP/1.1
> Host: s.upsilo.net
> User-Agent: curl/7.50.1
> Accept: */*
> Cookie: OpenPNE_pc_backend=a856c308144700966e799801ba0b082e
>
< HTTP/1.1 200 OK
< Date: Mon, 05 Sep 2016 10:03:08 GMT
< Server: Apache/2.4.23 (Debian)
< X-Powered-By: PHP/5.6.24
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
< Pragma: no-cache
< Content-Disposition: attachment; filename="%E6%97%A5%E6%9C%AC%E8%AA%9E.txt"; filename*=utf-8''%E6%97%A5%E6%9C%AC%E8%AA%9E.txt
< Strict-Transport-Security: max-age=15768000
< Upgrade: h2,h2c
< Connection: Upgrade
< Content-Length: 9
< Content-Type: application/octet-stream
<
hogehoge
User-Agent に MSIE を含むクライアントへのレスポンス:
$ curl -v -b 'OpenPNE_pc_backend=a856c308144700966e799801ba0b082e' -A 'MSIE' 'https://s.upsilo.net/master/pc_backend.php/monitoring/fileDownload/id/3'
> GET /master/pc_backend.php/monitoring/fileDownload/id/3 HTTP/1.1
> Host: s.upsilo.net
> User-Agent: MSIE
> Accept: */*
> Cookie: OpenPNE_pc_backend=a856c308144700966e799801ba0b082e
>
< HTTP/1.1 200 OK
< Date: Mon, 05 Sep 2016 10:02:44 GMT
< Server: Apache/2.4.23 (Debian)
< X-Powered-By: PHP/5.6.24
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
< Pragma: no-cache
< Content-Disposition: attachment; filename="%93%FA%96%7B%8C%EA.txt"; filename*=utf-8''%93%FA%96%7B%8C%EA.txt
< Strict-Transport-Security: max-age=15768000
< Upgrade: h2,h2c
< Connection: Upgrade
< Content-Length: 9
< Content-Type: application/octet-stream
<
hogehoge