Skip to content

Fix MockHttpServletRequest.setCookies to produce single Cookie header #23074

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

Closed
wants to merge 1 commit into from

Conversation

L00kian
Copy link
Contributor

@L00kian L00kian commented Jun 3, 2019

Fixes #23029

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jun 3, 2019
@sbrannen sbrannen added in: web Issues in web modules (web, webmvc, webflux, websocket) in: test Issues in the test module type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jun 5, 2019
@sbrannen sbrannen self-assigned this Jun 5, 2019
@sbrannen sbrannen added type: bug A general bug and removed type: enhancement A general enhancement labels Jun 5, 2019
@sbrannen
Copy link
Member

sbrannen commented Jun 5, 2019

Thanks for submitting the PR!

We'll review this and likely merge it soon.

@sbrannen sbrannen added this to the 5.1.8 milestone Jun 5, 2019
@spring-projects-issues spring-projects-issues added status: backported An issue that has been backported to maintenance branches and removed for: backport-to-5.0.x labels Jun 5, 2019
@sbrannen sbrannen changed the title Fixed MockHttpServletRequest.setCookies to produce single cookie header Fix MockHttpServletRequest.setCookies to produce single Cookie header Jun 5, 2019
sbrannen pushed a commit that referenced this pull request Jun 6, 2019
Prior to this commit, MockHttpServletRequest.setCookies() produced one
Cookie header per supplied cookie, resulting in multiple Cookie headers
which violates the specification.

This commit fixes this by ensuring that all cookie name-value pairs are
stored under a single Cookie header, separated by a semicolon.

Closes gh-23074
@sbrannen sbrannen closed this in 2ed81be Jun 6, 2019
@L00kian L00kian deleted the fix-23029 branch July 2, 2019 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: test Issues in the test module in: web Issues in web modules (web, webmvc, webflux, websocket) status: backported An issue that has been backported to maintenance branches type: bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MockHttpServletRequest setCookies should join cookies to single Cookie header
3 participants