Commit be2ddba
[Agent: Claude] fix(lws): HEAD legacy branch mirrors the non-RDF source gate — no 200 where GET teaches 406
- negotiateHeadFileContentType's legacy JSON-LD branch (~line 1190) was
still gated on bare isRdfContentType(storedContentType), which includes
plain application/json — under --lws a stored .json HEAD with
Accept: text/turtle or Accept: application/ld+json returned a lying 200
where GET correctly 406-teaches (reviewer-reproduced, final whole-round
review Important #1)
- fix: mirror GET's ternary (lwsEnabled ? isRdfSourceType : isRdfContentType)
so under --lws plain JSON falls past the legacy branch to the F3 HEAD
406-teaching mirror; stored JSON-LD → JSON-LD target still passes;
--lws-off stays byte-identical (ternary's else arm is the old predicate)
- test/lws-nonrdf-teaching.test.js: two new HEAD/.json cases (Accept:
text/turtle and Accept: application/ld+json), each asserting HEAD status
equals the paired GET's 406 and content-type application/problem+json
- verified: targeted 4-file run 33/33 pass; full suite 1437 tests, 1436
pass, 0 fail, 1 pre-existing skip
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 71da6f0 commit be2ddba
2 files changed
Lines changed: 27 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1183 | 1183 | | |
1184 | 1184 | | |
1185 | 1185 | | |
1186 | | - | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
1187 | 1191 | | |
1188 | 1192 | | |
1189 | 1193 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
36 | 58 | | |
37 | 59 | | |
38 | 60 | | |
| |||
0 commit comments