Lift up checks to notAcceptable to the middleware#434
Merged
dahlia merged 11 commits intofedify-dev:nextfrom Sep 21, 2025
Merged
Lift up checks to notAcceptable to the middleware#434dahlia merged 11 commits intofedify-dev:nextfrom
dahlia merged 11 commits intofedify-dev:nextfrom
Conversation
65b31be to
92104c4
Compare
This comment was marked as outdated.
This comment was marked as outdated.
92104c4 to
f6468c9
Compare
ThisIsMissEm
commented
Sep 20, 2025
This comment was marked as outdated.
This comment was marked as outdated.
Contributor
Author
|
A bunch of these changes can be pulled out (e.g., deno caching and the duplicate key in deno.json, and silencing installs — I was trying to get cleaner more focused test logs, as currently they're a little too big to debug & cause rendering issues (like the lines fail to render as you scroll) |
Contributor
|
The docs for this pull request have been published: |
Contributor
|
The latest push to this pull request has been published to JSR and npm as a pre-release:
|
5 tasks
ThisIsMissEm
commented
Sep 21, 2025
dahlia
approved these changes
Sep 21, 2025
Member
dahlia
left a comment
There was a problem hiding this comment.
Good job! Thanks for your contribution.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Following discussion in discourse, this PR shows the triggering of
notAcceptablehappening from the middleware before any of the dispatchers are triggered, since they should only be triggered if they would actually be acceptable and lead to a response.This means that when you're passing through requests via content-negotiation, the fedify dispatcher is not fired if it's not a
Acceptcontent-type that fedify would actually handle.This would be a major breaking change, hence targeting
nextRelated Issue
There doesn't seem to be related issues reported, however, it's a common point of confusion for integraters "why is my fedify dispatcher firing for this html request?"
Changes
List the specific modifications made in this PR.
Focus on what was changed without going into detail about impact.
acceptsJsonLdtonegotiation.ts(fromhandle.ts)handler.test.ts— I'm still not 100% sure how these tests were working.Benefits
Describe the advantages or improvements brought by these changes.
Explain how these changes affect the project, users, or performance.
Checklist
deno task test-allon your machine?Additional Notes
Include any other information, context, or considerations.