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 ignores form encoding type [SPR-14916] #19483

Closed
spring-projects-issues opened this issue Nov 16, 2016 · 3 comments
Closed
Assignees
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Nov 16, 2016

Mark Hobson opened SPR-14916 and commented

When using MockMvc with HtmlUnit submitting a form via WebDriver does not send the correct content type header.

The problem is that HtmlUnitRequestBuilder does not use HtmlUnit's WebRequest.encodingType when determining the resultant MockHttpServletRequest's content type.

See the referenced GitHub repo for an example. This Spring test fails using HtmlUnit but passes when ChromeDriver is configured as the WebDriver bean.


Affects: 4.3.4

Reference URL: https://github.com/markhobson/spring-htmlunit-bug

Referenced from: commits 38b6746, 872d6ef

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Nov 28, 2016

Rossen Stoyanchev commented

This should be fixed now. Thanks for the detailed report and sample.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Dec 3, 2016

Mark Hobson commented

I've just tried the latest 4.3.5 snapshot and it's working great now, thanks!

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Dec 5, 2016

Rossen Stoyanchev commented

Thanks for confirming.

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
You can’t perform that action at this time.