Skip to content

Commit

Permalink
Experiment: EPUB encryption support test-2a
Browse files Browse the repository at this point in the history
  • Loading branch information
MurakamiShinyu committed Aug 29, 2023
1 parent c4c2df7 commit d0621f7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/core/src/vivliostyle/net.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ export function ajax(
opt_type,
opt_method,
opt_data,
opt_contentType,
opt_contentType ?? opt_type === XMLHttpRequestResponseType.DOCUMENT
? "application/xml; charset=UTF-8"
: undefined,
).then((xhr2) => {
xhr2.url = url;
frame.finish(xhr2);
Expand Down Expand Up @@ -146,6 +148,9 @@ export function ajax(
opt_contentType || "text/plain; charset=UTF-8",
);
request.send(opt_data);
} else if (opt_contentType) {
request.overrideMimeType(opt_contentType);
request.send(null);
} else {
if (
/^file:|^https?:\/\/[^/]+\.githubusercontent\.com|\.(xhtml|xht|opf)$/i.test(
Expand Down

0 comments on commit d0621f7

Please sign in to comment.