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

Don't throw on inconsistent content type #65

Merged
merged 3 commits into from
Dec 11, 2020

Conversation

w1kman
Copy link
Contributor

@w1kman w1kman commented Dec 10, 2020

The Problem

When postData.mimeType and Content-Type headers were not equal, the har-to-k6 converter threw "Inconsistent post content type (0): 'text/plain' vs 'application/x-www-form-urlencoded'."

This causes many recordings or HAR imports to fail because many applications out in the wild don't follow/care about standards.

New behavior

Inconsistency is still recognized, but instead of throwing an InvalidArchiveError, it is logged via console.warn

Copy link
Collaborator

@legander legander left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

Copy link
Contributor

@allansson allansson left a comment

Choose a reason for hiding this comment

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

Looks good.

test/unit/validate/request.test.js Outdated Show resolved Hide resolved
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

3 participants