Skip to content

Conversation

@fchtngr
Copy link
Contributor

@fchtngr fchtngr commented Nov 11, 2025

@xhaggi the new PR based off of the main branch (instead 4.x)

see original PR here

…ethods

For methods annotated with @responsebody (or controllers with @RestController), the response is already commited before the interceptor is invoked, thus the headers won't be written. The ResponseBodyAdvice was added to handle these cases.
@xhaggi xhaggi self-requested a review November 19, 2025 07:41
Copy link
Collaborator

@xhaggi xhaggi left a comment

Choose a reason for hiding this comment

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

@fchtngr looks good. Thank you 👍

Copy link
Collaborator

@xhaggi xhaggi left a comment

Choose a reason for hiding this comment

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

Please rebase your branch onto main again.

public RequestMappingHandlerMapping getRequestMappingHandlerMapping() {
return new HtmxRequestMappingHandlerMapping();
public RequestMappingHandlerAdapter getRequestMappingHandlerAdapter() {
var adapter = new RequestMappingHandlerAdapter();
Copy link
Collaborator

@xhaggi xhaggi Nov 19, 2025

Choose a reason for hiding this comment

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

Please add back the getRequestMappingHandlerMapping method? Otherwise, the request mapping is broken.

@xhaggi xhaggi changed the title Add HtmxResponseBodyAdvice to handle HTMX headers for @responsebody methods Add HtmxResponseBodyAdvice to handle HTMX headers for @ResponseBody methods Nov 19, 2025
@xhaggi xhaggi changed the title Add HtmxResponseBodyAdvice to handle HTMX headers for @ResponseBody methods Handle htmx headers for @ResponseBody methods Nov 19, 2025
@xhaggi
Copy link
Collaborator

xhaggi commented Nov 19, 2025

@fchtngr and could you please shorten the commit message Handle htmx headers for @ResponseBody methods.

@xhaggi xhaggi added this to the 5.0.0 milestone Nov 21, 2025
@wimdeblauwe
Copy link
Owner

@fchtngr When would you be able to do the changes? We would like to release a 5.0.0 with this included today or tomorrow.

@xhaggi xhaggi closed this in 806cb69 Nov 24, 2025
xhaggi added a commit that referenced this pull request Nov 24, 2025
Handle htmx headers for @responsebody methods
@xhaggi
Copy link
Collaborator

xhaggi commented Nov 24, 2025

@fchtngr I made the necessary adjustments and merged it in. Thank you for your contribution.

@fchtngr
Copy link
Contributor Author

fchtngr commented Nov 26, 2025

@xhaggi @wimdeblauwe thx, i was away for a few days. thanks for updating and merging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants