Skip to content

Commit a1909bd

Browse files
committed
Moved fix to a better location
1 parent e576ea9 commit a1909bd

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

lib/handlers/get.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ async function handler (req, res, next) {
4545

4646
let ret
4747
try {
48-
ret = await ldp.get(options)
48+
ret = await ldp.get(options, req.headers.accept.includes('text/html'))
4949
} catch (err) {
5050
// use globHandler if magic is detected
5151
if (err.status === 404 && glob.hasMagic(path)) {

lib/resource-mapper.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,6 @@ class ResourceMapper {
7070

7171
// Find a file with the same name (minus the dollar extension)
7272
let match = searchIndex ? await this._getMatchingFile(folder, filename, isIndex) : ''
73-
// Do not match with html if the content type won't allow it
74-
if (
75-
contentType &&
76-
!contentType.includes('text/html') &&
77-
match === this._indexFilename
78-
) {
79-
match = ''
80-
}
8173
if (match === undefined) {
8274
// Error if no match was found,
8375
// unless the URL ends with a '/',

0 commit comments

Comments
 (0)