Skip to content

Conversation

@sravs-dev
Copy link
Contributor

Fix for the issue #5512

When there is a POST request with payload type "application/x-www-form-urlencoded" , Input body is of type bytes. We need to convert it to string before processing

@pull-request-size pull-request-size bot added the size/XS PR that changes 0-9 lines. Quick fix/merge. label Dec 20, 2021
@CLAassistant
Copy link

CLAassistant commented Dec 20, 2021

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

✅ armab
✅ sravs-dev
❌ Sravanthi Konduru


Sravanthi Konduru seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@sravs-dev sravs-dev force-pushed the sravanthi/router_fix branch from 9ab7c2c to e769c50 Compare December 20, 2021 18:44
Copy link
Contributor

@m4dcoder m4dcoder left a comment

Choose a reason for hiding this comment

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

@sravs-dev
Copy link
Contributor Author

@sravs-dev Thanks for the contrib! Can you add a unit test at https://github.com/StackStorm/st2/blob/master/st2api/tests/unit/controllers/v1/test_base.py?

Sure, will add

@sravs-dev
Copy link
Contributor Author

@sravs-dev Thanks for the contrib! Can you add a unit test at https://github.com/StackStorm/st2/blob/master/st2api/tests/unit/controllers/v1/test_base.py?

Sure, will add

@m4dcoder Is there a setup guide that I can follow for running tests? I guess the tests expect mongo DB to be running in the localhost?

@sravs-dev
Copy link
Contributor Author

@m4dcoder I see that my change is already covered in an existing test case here. I see that the unit test is temporarily disabled by @Kami in this commit . I have enabled the unit test as part of this PR. We can see if the existing test passes with my router fix.

@sravs-dev sravs-dev changed the title Router fix to handle bytes input in the payload Router fix to handle url encoded form payload Dec 28, 2021
@pull-request-size pull-request-size bot added size/S PR that changes 10-29 lines. Very easy to review. and removed size/XS PR that changes 0-9 lines. Quick fix/merge. labels Dec 28, 2021
@arm4b arm4b added the bug fix label Jan 4, 2022
@arm4b arm4b added this to the 3.7.0 milestone Jan 4, 2022
@arm4b
Copy link
Member

arm4b commented Jan 4, 2022

@sravs-dev Thanks for the fix!

From the CI issues (https://github.com/StackStorm/st2/runs/4706277178), only the lining is failing for test_sso.py, please reformat it with Black.

Could you please also update the CHANGELOG.rst with the description for this fix?

@sravs-dev
Copy link
Contributor Author

@sravs-dev Thanks for the fix!

From the CI issues (https://github.com/StackStorm/st2/runs/4706277178), only the lining is failing for test_sso.py, please reformat it with Black.

Could you please also update the CHANGELOG.rst with the description for this fix?

@armab Thanks for checking, I fixed the format issue and updated changelog. Need approval to run CI checks.

@arm4b
Copy link
Member

arm4b commented Jan 11, 2022

@sravs-dev Thanks! All good, the only missing is the CLA check. Looks like your github account wasn't associated with the commits.

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.

✅ sravs-dev
❌ Sravanthi Konduru


Sravanthi Konduru seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Could you try that by adding the email associated with those commits to your github account? See more details in the: #5513 (comment)

@sravs-dev sravs-dev closed this Jan 12, 2022
@sravs-dev
Copy link
Contributor Author

@armab CLA check was failing due to wrong email associated with git commits. Corrected email and submitted new PR #5536 . Need approval in new PR to run CI checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug fix size/S PR that changes 10-29 lines. Very easy to review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

st2 POST API with content type= "application/x-www-form-urlencoded" not working

4 participants