cstamas commented on code in PR #1846:
URL: https://github.com/apache/maven-resolver/pull/1846#discussion_r3111598926
##########
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:
CF sends `Content-Type: application/problem+json; charset=utf-8` on
response, so equality will not work.
--
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]