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

Support for removeHeader in MockHttpServletRequest [SPR-17295] #21828

Closed
spring-projects-issues opened this issue Sep 21, 2018 · 2 comments
Closed
Assignees
Labels
in: test status: backported type: enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Sep 21, 2018

Veit Guna opened SPR-17295 and commented

The MockHttpServletRequest supports methods like removeParameter or removeAttribute but sadly not removeHeader.

It can be quite handy to have one method, that creates a default mock request, having default values, and then in some specific tests being able to modify the default request as needed.

Would be cool if that could be added.

 


Affects: 5.0.9

Issue Links:

  • #21821 Remove/overwrite header in MockHttpServletRequest
  • #21924 Allow setting headers in MockHttpServletRequest

Referenced from: commits a21ce42, 255015f, e978f90, a76b8de, 51ba322

Backported to: 5.0.10, 4.3.20

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Sep 24, 2018

Christopher Smith commented

Would it be possible to backport this to 4.3?

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Sep 30, 2018

Veit Guna commented

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: test status: backported type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants