Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return content-type from saved request #13440

Merged

Conversation

repolevedavaj
Copy link

@repolevedavaj repolevedavaj commented Jun 30, 2023

We detected an issue in the process of handling the original request, after redirecting the Browser to the authenticated entry point: As the SavedRequestAwareWrapper is not exposing the content-type of the original request, Spring cannot resolve the handler method correctly, if it specifies a consumes parameter (see attached example: post-redirect.zip).

@PostMapping(path = "example-post", consumes = {
        MediaType.APPLICATION_FORM_URLENCODED_VALUE,
        MediaType.ALL_VALUE // only needed if browser has been redirected to the authentication entry point
})
public String exampleHandler() {
    ...
}

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 30, 2023
@repolevedavaj
Copy link
Author

Is there any update on this PR?

@jzheaux jzheaux self-assigned this Aug 7, 2023
@jzheaux jzheaux added in: web An issue in web modules (web, webmvc) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Aug 7, 2023
@jzheaux jzheaux added this to the 6.2.0-M2 milestone Aug 7, 2023
@jzheaux jzheaux merged commit 0d4e3f9 into spring-projects:main Aug 7, 2023
@jzheaux
Copy link
Contributor

jzheaux commented Aug 7, 2023

Thanks, @repolevedavaj! This is now merged into main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web An issue in web modules (web, webmvc) type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants