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

fix(legacy-scripting-runner): prune body if allowGetBody and body is empty #224

Merged
merged 1 commit into from
May 18, 2020

Conversation

eliangcs
Copy link
Member

@eliangcs eliangcs commented May 18, 2020

In #195, we introduced allowGetBody as a z.request option. There's a bug. When the option is enabled, we always send an empty object as the request body. Depending on the server implementation, some could raise an error if they get a {} in a GET request's body. This PR fixes that so legacy-scripting-runner doesn't do that. Core will still do that (sends an empty-object request body), so we should fix it from core too. But given that legacy-scripting-runner is the only user of allowGetBody, we can fix it later.

@eliangcs eliangcs changed the title fix(legacy-scripting-runner): prune body if allowGetBody and body is … fix(legacy-scripting-runner): prune body if allowGetBody and body is empty May 18, 2020
@eliangcs eliangcs marked this pull request as ready for review May 18, 2020 09:03
@eliangcs eliangcs requested a review from xavdid as a code owner May 18, 2020 09:03
@eliangcs eliangcs merged commit ef27856 into master May 18, 2020
@eliangcs eliangcs deleted the get-allow-body-defaults-no-body branch May 18, 2020 09:06
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.

1 participant