@lde/distribution-probe 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/probe.js +4 -1
  2. package/package.json +1 -1
package/dist/probe.js CHANGED
@@ -320,7 +320,10 @@ async function validateBody(body, contentType, baseIRI, timeoutMs) {
320
320
  if (body.length === 0) {
321
321
  return 'Distribution is empty';
322
322
  }
323
- const serialization = contentType?.split(';')[0].trim();
323
+ // Media types are case-insensitive (RFC 9110 §8.3.1), so normalise before
324
+ // matching the lower-case allow-list — a server sending `Application/LD+JSON`
325
+ // must still have its body validated.
326
+ const serialization = contentType?.split(';')[0].trim().toLowerCase();
324
327
  if (!serialization || !rdfContentTypes.includes(serialization)) {
325
328
  return null;
326
329
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lde/distribution-probe",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "repository": {
5
5
  "url": "git+https://github.com/ldelements/lde.git",
6
6
  "directory": "packages/distribution-probe"