Skip to content

Conversation

@kobaeugenea
Copy link
Contributor

#18551
Solved this issue. If param is an instance of KeyDataPair so add it as part, not as parameter.

@sbrannen
Copy link
Member

Thanks for the PR!

We'll review it with the intent to include it in 5.3.

In the interim, @rstoyanchev, in #18551 (comment) you mentioned that the implementation would need to switch from a MockHttpServletRequest to a MockMultipartHttpServletRequest; whereas, this PR works directly with the existing Part support in the MockHttpServletRequest. Do you still feel that the HtmlUnit support would need the MultipartHttpServletRequest API?

@sbrannen sbrannen added in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement in: test Issues in the test module labels Apr 18, 2020
@sbrannen sbrannen added this to the 5.3 M1 milestone Apr 18, 2020
@rstoyanchev rstoyanchev self-assigned this Apr 22, 2020
@rstoyanchev rstoyanchev removed the status: waiting-for-triage An issue we've not yet triaged or decided on label Apr 22, 2020
@rstoyanchev
Copy link
Contributor

Creating MockMultipartHttpServletRequest would be closer to simulating an application with a MultipartPartResolver configured. However, for Servlet 3 multipart requests that's not strictly required, and for example MultipartResolutionDelegate will wrap the request with StandardMultipartHttpServletRequest if necessary.

@kobaeugenea
Copy link
Contributor Author

So can we leave this way of implementation or should I re-implement to use MockMultipartHttpServletRequest?

@rstoyanchev rstoyanchev changed the title Make HtmlUnitRequestBuilder handle form data file properly Add file parameters as request parts in HtmlUnitRequestBuilder May 6, 2020
rstoyanchev added a commit that referenced this pull request May 6, 2020
rstoyanchev added a commit that referenced this pull request May 6, 2020
@rstoyanchev rstoyanchev closed this May 6, 2020
kenny5he pushed a commit to kenny5he/spring-framework that referenced this pull request Jun 21, 2020
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) type: enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants