Skip to content

Commit 5544df6

Browse files
committed
fix: Correctly Set Location on non-RDF Notifications
When the negotiated media-type for notifications is not RDF, the `location` property is correctly set to the `Location` header in the generated notification. Express-PREP now handles this by default.
1 parent 2da77b0 commit 5544df6

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

lib/handlers/notify.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,7 @@ function handler (req, res, next) {
7676
mediaType
7777
})}`
7878
} else {
79-
return defaultNotification({
80-
...(res.method === 'POST') && { location: res.getHeader('Content-Location') }
81-
})
79+
return defaultNotification()
8280
}
8381
}
8482
})

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
"express-accept-events": "^0.3.0",
7878
"express-handlebars": "^5.3.5",
7979
"express-negotiate-events": "^0.3.0",
80-
"express-prep": "^0.6.2",
80+
"express-prep": "^0.6.3",
8181
"express-session": "^1.18.0",
8282
"extend": "^3.0.2",
8383
"from2": "^2.3.0",

0 commit comments

Comments
 (0)