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

Remove ResourceController mappigs with param useDefaultLabel #1643

Closed
spencergibb opened this issue Jun 25, 2020 · 6 comments · Fixed by #1728
Closed

Remove ResourceController mappigs with param useDefaultLabel #1643

spencergibb opened this issue Jun 25, 2020 · 6 comments · Fixed by #1728
Labels
Projects
Milestone

Comments

@spencergibb
Copy link
Member

spencergibb commented Jun 25, 2020

ResourceController has multiple @RequestMappings that would conflict, currently to avoid passing the label we use the useDefaultLabel request parameter to select. Starting with spring 5.3 this is no longer happening.

Given

	@RequestMapping("/{name}/{profile}/{label}/**")
// and 
	@RequestMapping(value = "/{name}/{profile}/**", params = "useDefaultLabel")

Calling /foo/default/file.txt?useDefaultLabel used to route to the later, now it routes to the former and produces an error because the file is treated as a label.

@spencergibb
Copy link
Member Author

After writing some samples, it appears that using the useDefaultLabel request parameter to select a different @RequestMapping hasn't worked for some time. It appears that no one is using this as no one is reporting problems. This method will get removed instead.

@spencergibb spencergibb changed the title ResourceController with param useDefaultLabel no longer selected Remove ResourceController mappigs with param useDefaultLabel Jun 26, 2020
@spencergibb spencergibb added task and removed bug labels Jun 26, 2020
@spencergibb spencergibb added this to the 3.0.0-M3 milestone Jun 26, 2020
@spencergibb spencergibb added this to To do in 2020.0.0-M4 via automation Jul 24, 2020
@spencergibb spencergibb removed this from To do in 2020.0.0-M3 Jul 24, 2020
@dinhani
Copy link

dinhani commented Sep 23, 2020

I was starting to use the the ResourceController for serving plain-text files, but it did not work.
Is the support for plain-text files being removed or just migrated to something else?

@spencergibb
Copy link
Member Author

@dinhani no, this is to remove specific use of a query parameter named useDefaultLabel that doesn't work anyway.

@ThomasVitale
Copy link
Contributor

@spencergibb can I help with this task?

@spencergibb
Copy link
Member Author

@ThomasVitale sure

@ThomasVitale
Copy link
Contributor

ThomasVitale commented Oct 20, 2020

@spencergibb I've just created a PR: #1728
I've removed both mappings in ResourceController using the useDefaultLabel. Is it ok?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
2020.0.0-M5
  
Done
Development

Successfully merging a pull request may close this issue.

3 participants