Skip to content

Commit

Permalink
Fix error "empty response for EPUB OPF" on some web servers that don'…
Browse files Browse the repository at this point in the history
…t know the MIME type for .opf
  • Loading branch information
MurakamiShinyu committed Aug 11, 2019
1 parent 48fb3ac commit db8e9bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ts/adapt/net.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ export function ajax(
);
request.send(opt_data);
} else {
if (/^file:|^https?:\/\/[^/]+\.githubusercontent\.com/.test(url)) {
// File or GitHub raw URL
if (/^file:|^https?:\/\/[^/]+\.githubusercontent\.com|\.opf$/.test(url)) {
// File or GitHub raw URL or .opf
if (
/\/aozorabunko\/[^/]+\/cards\/[^/]+\/files\/[^/.]+\.html$/.test(url)
) {
Expand Down

0 comments on commit db8e9bc

Please sign in to comment.