Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

hotfix: application/x-www-form-urlencoded bug #818

Merged
merged 4 commits into from
Jul 1, 2020
Merged

Conversation

erunion
Copy link
Member

@erunion erunion commented Jul 1, 2020

This is extracting #807 out of master so it can be published to its own hotfix release.

domharrington and others added 4 commits July 1, 2020 10:09
…eing handled properly (#807)

* test: added failing test case for formData issue

I added two test cases: one for json and one for formData. The json
one passes fine! This code in oas-to-har is working as expected:
https://github.com/readmeio/api-explorer/blob/59a5d060997321936ae356f2ba3f36e34c81c520/packages/oas-to-har/src/index.js#L198

I narrowed down the issue to here:
https://github.com/Kong/httpsnippet/blob/633b825364ab050f02556cfa837148a1e136fd69/src/index.js#L126-L128
httpsnippet is setting it from the value we set back to ""

I'm not sure if this is something that's changed recently in the way
we're generating hars? This part of httpsnippet hasn't been updated
in 5 years. Gunna defer to Jon for this.

* fix: correctly preparing `x-www-form-urlencoded` forms as params

* fix: oas-to-har will now output valid HAR definitions

* chore(deps): upgrading fetch-har to 3.0.0

* docs: adding an example for our handling of formData

Co-authored-by: Jon Ursenbach <jon@ursenba.ch>
@erunion erunion marked this pull request as ready for review July 1, 2020 18:28
@erunion erunion merged commit a40b605 into master Jul 1, 2020
@erunion erunion deleted the hotfix/formdata-bug branch July 1, 2020 18:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants