GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Send "Accept" request header to indicate RFC 9457 compliance by kwin · Pull Request #1846 · apache/maven-resolver

Conversation

@kwin

@kwin kwin commented Apr 20, 2026

Copy link
Copy Markdown
Member

Also evaluate RFC 9457 responses for PUT requests
Add tests to check for proper "Accept" headers for GET/HEAD/PUT

This closes #1845

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Your pull request should address just one issue, without pulling in other changes.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Each commit in the pull request should have a meaningful subject line and body.
    Note that commits might be squashed by a maintainer on merge.
  • Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied.
    This may not always be possible but is a best-practice.
  • Run mvn verify to make sure basic checks pass.
    A more thorough check will be performed on your pull request automatically.
  • You have run the integration tests successfully (mvn -Prun-its verify).

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

  • I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004
  • In any other case, please file an Apache Individual Contributor License Agreement.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@kwin
Send "Accept" request header to indicate RFC 9457 compliance
34138bf
Also evaluate RFC 9457 responses for PUT requests
Add tests to check for proper "Accept" headers for GET/HEAD/PUT

This closes #1845
@kwin
kwin requested a review from cstamas April 20, 2026 14:49
cstamas
cstamas reviewed Apr 20, 2026
View reviewed changes
Comment thread ...i/src/main/java/org/eclipse/aether/spi/connector/transport/http/RFC9457/RFC9457Reporter.java

protected boolean hasRFC9457ContentType(String contentType) {
return "application/problem+json".equals(contentType);
return CONTENT_TYPE_PROBLEM_DETAILS_JSON.equals(contentType);

@cstamas cstamas Apr 20, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CF sends Content-Type: application/problem+json; charset=utf-8 on response, so equality will not work.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@cstamas cstamas Apr 20, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just "contains" or "starts with"? (with proper nullcheck on contentType?). Just to keep it simple.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@kwin kwin Apr 20, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I strip attributes from that header now in e4521fa.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@cstamas cstamas added this to the 2.0.17 milestone Apr 20, 2026
@cstamas cstamas added the bug Something isn't working label Apr 20, 2026
kwin added 2 commits April 20, 2026 17:57
@kwin
Ignore content-type attributes for comparison
e4521fa
Add IT against Cloudflare provided RFC 9457 endpoints
(https://blog.cloudflare.com/rfc-9457-agent-error-pages/#how-to-use-it)
@kwin
remove commented (now irrelevant) Java properties from static
0ec3573
initializer
cstamas
cstamas approved these changes Apr 20, 2026
View reviewed changes
@cstamas
cstamas requested review from gnodet and slawekjaranowski April 20, 2026 16:16
@kwin
Only emit non-null members of RFC 9457 payload
de05b2f
Fix javadoc
@kwin
kwin merged commit a4c4240 into master Apr 21, 2026
16 of 17 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@kwin
kwin deleted the feature/send-accept-header-for-rfc-9457 branch April 21, 2026 18:36
@github-actions github-actions Bot assigned kwin Apr 21, 2026
@slawekjaranowski slawekjaranowski mentioned this pull request May 26, 2026
HTTP Status: 406 during deployment to nexus 2 apache/maven#12154
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cstamas cstamas cstamas approved these changes
@gnodet gnodet Awaiting requested review from gnodet
@slawekjaranowski slawekjaranowski Awaiting requested review from slawekjaranowski

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@kwin kwin

Labels

bug Something isn't working

Projects

None yet

Milestone

2.0.17

Development

Successfully merging this pull request may close these issues.

Add request Accept header indicating that RFC 9457 responses are understood

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@kwin @cstamas
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.