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

HtmlUnitRequestBuilder corrupts the parent RequestBuilder [SPR-14584] #19153

Closed
spring-projects-issues opened this issue Aug 13, 2016 · 0 comments
Closed
Assignees
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Aug 13, 2016

Rob Winch opened SPR-14584 and commented

HtmlUnitRequestBuilder corrupts the parent RequestBuilder. For example:

String pathInfo = "/foo/bar";
MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new HelloController())
		.defaultRequest(get("/"))
		.build();

// passes
assertThat(mockMvc.perform(get(pathInfo)).andReturn().getRequest().getPathInfo(), equalTo(pathInfo));

// corrupts the pathInfo of the parent builder
mockMvc.perform(requestBuilder);

// fails because the parent builder's path info is now set to "/"	
assertThat(mockMvc.perform(get(pathInfo)).andReturn().getRequest().getPathInfo(), equalTo(pathInfo));

Affects: 4.3.2, 5.0 M1

Referenced from: commits 43faabd, 966baea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants