kwin commented on code in PR #1846:
URL: https://github.com/apache/maven-resolver/pull/1846#discussion_r3111980984


##########
maven-resolver-spi/src/main/java/org/eclipse/aether/spi/connector/transport/http/RFC9457/RFC9457Reporter.java:
##########
@@ -41,8 +44,16 @@ public abstract class RFC9457Reporter<T, E extends 
Exception> {
 
     protected abstract String getBody(T response) throws IOException;
 
+    /**
+     * Prepares the request to accept RFC 9457 responses.
+     * This involves setting/updating the "Accept" header to include 
"application/problem+json".
+     * @param request The request or request builder to prepare
+     * @see <a href=https://www.rfc-editor.org/rfc/rfc9457#section-3-2>RFC 
9457 section 3.2</a>
+     */
+    public abstract void prepareRequest(R request);
+
     protected boolean hasRFC9457ContentType(String contentType) {
-        return "application/problem+json".equals(contentType);
+        return CONTENT_TYPE_PROBLEM_DETAILS_JSON.equals(contentType);

Review Comment:
   I strip attributes from that header now in 
https://github.com/apache/maven-resolver/pull/1846/commits/e4521fa1164d0dc6c06875159568e1c180feddbe.



-- 
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]

Reply via email to