Skip to content

Commit cb89f47

Browse files
namedgraphclaude
andcommitted
Set REQUEST_URI_HEADER on proxy client response before entity read
ModelProvider / HtmlJsonLDReader requires a base URI hint (set via REQUEST_URI_HEADER on the response) to resolve relative references when parsing HTML+JSON-LD. Without it jsoup throws a NullPointerException. Mirrors the header injection done in the old ProxiedGraph.get(). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 8b9e646 commit cb89f47

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/com/atomgraph/linkeddatahub/server/filter/request/ProxyRequestFilter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,8 @@ else if (agentContext instanceof IDTokenSecurityContext idTokenSecurityContext)
180180

181181
try (clientResponse)
182182
{
183+
// provide the target URI as a base URI hint so ModelProvider / HtmlJsonLDReader can resolve relative references
184+
clientResponse.getHeaders().putSingle(com.atomgraph.core.io.ModelProvider.REQUEST_URI_HEADER, targetURI.toString());
183185
requestContext.abortWith(getResponse(clientResponse));
184186
}
185187
}

0 commit comments

Comments
 (0)