afs commented on issue #1318: URL: https://github.com/apache/jena/issues/1318#issuecomment-1128893670
The problem is in the outgoing credentials request after the 401 challenge. It is the SPARQL string not being encoded and it has a newline in it; the JDK rejects the request locally. The server has only send the 401 challenge which is legal and isn't involved in the exception cause at `Utils.newIAE`. The "uri" auth param in a digest is the "request-target". That includes the query string by my readng of RFC7616->RFC7230 section 5.5 But that does not make sense in our situation * "?query=" and POST+application/sparql-results should be the same authentication. It is not like `/path?client=1234` where the query string is a subresource. * The auth support is by URI path and realm, not query string. The users/password applies to the endpoint. So for the SPARQL case, a request-target of the URI path make sense to me (no query). This work with Jetty. This is not surprising because the Jetty resource is named by the URI without query string. Putting in the encoded query also works with Jetty `HttpLib.requestTarget` - use `getRawQuery` not `getQuery`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
