]>
BookStack Code Mirror - bookstack/commitdiff
projects
/
bookstack
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
e4660a5
)
Fixed response JSON detection when charset existed
author
Dan Brown
<redacted>
Sun, 18 Apr 2021 21:12:26 +0000
(22:12 +0100)
committer
Dan Brown
<redacted>
Sun, 18 Apr 2021 21:12:26 +0000
(22:12 +0100)
Fixes #2684
resources/js/services/http.js
patch
|
blob
|
history
diff --git
a/resources/js/services/http.js
b/resources/js/services/http.js
index b05dd23bfd7222834eade6395f655d5916b1b2c1..00865e69bd8ff83698864ed7c6d0dd0042ef465f 100644
(file)
--- a/
resources/js/services/http.js
+++ b/
resources/js/services/http.js
@@
-149,8
+149,8
@@
async function getResponseContent(response) {
return null;
}
- const responseContentType = response.headers.get('Content-Type');
- const subType = responseContentType.split('/').pop();
+ const responseContentType = response.headers.get('Content-Type')
|| ''
;
+ const subType = responseContentType.split('
;')[0].split('
/').pop();
if (subType === 'javascript' || subType === 'json') {
return await response.json();
hide
Morty Proxy
This is a
proxified and sanitized
view of the page, visit
original site
.