Commit 65e5f9f
Rework proxy
ProxyRequestFilter:
- Drop the `quality(MediaType)` helper and the topQ/filter pipeline. Per the
JAX-RS spec, `getAcceptableMediaTypes()` is sorted by q descending (Jersey:
`HttpHeaderReader.readQualifiedList` → `AcceptableMediaType.COMPARATOR`), so
the first non-wildcard type is the top-ranked one. Replace with a single
loop that returns on (X)HTML and breaks otherwise.
Tests:
- Add `GET-proxied-accept-forwarded.sh` regressing 708edfc: send a single
specific RDF type as `Accept` and assert the response `Content-Type` matches.
Pre-fix, ProxyRequestFilter substituted its own readable-types list for the
client's `Accept`, so upstream could pick any RDF format (e.g. rdf-thrift).
- Rework `GET-proxied-accept-html-not-preferred.sh` to use HTTP status as the
bypass-vs-forward discriminator. The previous content-type assertion was
unreachable in a symmetric admin/end-user setup — both paths negotiate the
same media type. A UUID-named non-existent path produces 200 on bypass
(`ApplicationFilter` strips `?uri=` → admin root) and 404 on forward.
- Silence `DEBUG:` echoes in `HEAD-proxied-etag.sh` to match the convention of
the other proxy tests.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>Accept regression tests, simplify q-rank bypass1 parent aca9825 commit 65e5f9f
4 files changed
Lines changed: 65 additions & 49 deletions
File tree
- http-tests/proxy
- src/main/java/com/atomgraph/linkeddatahub/server/filter/request
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
Lines changed: 12 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
24 | 30 | | |
25 | 31 | | |
| 32 | + | |
26 | 33 | | |
27 | | - | |
| 34 | + | |
28 | 35 | | |
29 | 36 | | |
30 | | - | |
31 | | - | |
| 37 | + | |
| 38 | + | |
32 | 39 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 40 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| 41 | + | |
| 42 | + | |
Lines changed: 12 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
152 | 151 | | |
153 | 152 | | |
154 | 153 | | |
| |||
212 | 211 | | |
213 | 212 | | |
214 | 213 | | |
215 | | - | |
216 | 214 | | |
217 | 215 | | |
218 | 216 | | |
| |||
287 | 285 | | |
288 | 286 | | |
289 | 287 | | |
290 | | - | |
291 | | - | |
292 | | - | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
293 | 291 | | |
294 | 292 | | |
295 | 293 | | |
| |||
377 | 375 | | |
378 | 376 | | |
379 | 377 | | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | 378 | | |
0 commit comments