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

Skips NPE when a multipart could not be parsed #2035

Merged
merged 1 commit into from
Mar 13, 2023

Conversation

sickmartian
Copy link
Contributor

@sickmartian sickmartian commented Nov 29, 2022

Recording the body instead.

This can happen when content of the multipart is not a file, so there is no header with content disposition giving it a filename. E.g. an OData $batch request.

Wiremock is currently failing the request, giving a 500 back because of the NPE, even when proxying when we got proper data back.

edit went a bit further on the library and saw what was going on, I assumed the lib I was using bad generating the request wrong and hence couldn't be parsed, but really wiremock assumes is going to be files whose parsing will work, not a bad assumption but it doesn't fit certain cases and the NPE is bad.

@sickmartian
Copy link
Contributor Author

Might be related to #702 although the description says valid json or xml, this might be a more general case.

@tomakehurst tomakehurst merged commit a2c13ab into wiremock:master Mar 13, 2023
@tomakehurst
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants