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

multipart/form-data works via REST client but fails in Karate tests #797 #914

Merged
merged 1 commit into from
Oct 4, 2019

Conversation

Nishant-sehgal
Copy link
Contributor

@ptrthomas
Implementation for resolving MockHttpClient multipart file upload issue.
Issue: #797

Issue was with StandardMultipartHttpServletRequest implementation that in spring-web.Which has started using different case for CONTENT_DISPOSITION header in the request due to which it throws NLP exception.

Have added a fallback in case of header not found to check with lowercase header value that we have in MockMultiPart.

Will work both in spring boot 1 and 2 dependency.

Verified the same in the demo project shared in the issue.

Before change Test case report:

image

After Change Test case report:

image

Copy link

@anands anands left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Nishant-sehgal Nishant-sehgal changed the title multipart/form-data endpoint success from REST client but fails in Ka… multipart/form-data works via REST client but fails in Karate tests #797 Oct 4, 2019
Copy link
Member

@ptrthomas ptrthomas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great work ! thanks :)

@ptrthomas ptrthomas merged commit 09c8375 into karatelabs:develop Oct 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants