• R/O
  • HTTP
  • SSH
  • HTTPS

fswiki: Commit

FreeStyleWiki


Commit MetaInfo

Revisione14a14db613678fe486838a46245c1ff8eb990f0 (tree)
Time2018-04-17 18:55:33
Authorkgsoft <kgsoft@user...>
Commiterkgsoft

Log Message

BugTrack-wiki/351 : Edgeブラウザーにおけるダウンロードファイル名の文字化け対応

Change Summary

Incremental Difference

--- a/lib/Util.pm
+++ b/lib/Util.pm
@@ -723,7 +723,7 @@ sub make_content_disposition {
723723 my ($filename, $disposition) = @_;
724724 my $ua = $ENV{"HTTP_USER_AGENT"};
725725 eval("use MIME::Base64;");
726- my $encoded = ( $ua =~ /MSIE|Trident/i ? Jcode->new($filename)->sjis
726+ my $encoded = ( $ua =~ /MSIE|Trident|Edge/i ? Jcode->new($filename)->sjis
727727 : $ua =~ /Chrome|Firefox/i ? "=?utf-8?B?".MIME::Base64::encode_base64(Jcode->new($filename)->utf8,'')."?="
728728 : Jcode->new($filename)->utf8 );
729729 return "Content-Disposition: $disposition;filename=\"".$encoded."\"\n\n";
Show on old repository browser