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

Removed decoding from Body Template Expansion #931

Merged
merged 2 commits into from
Apr 8, 2019

Conversation

kdavisk6
Copy link
Member

Fixes #916

In certain cases, a Body Template will contain a JSON payload. To
support this we are asking users to pct-encode the beginning and the
end of the JSON object when providing it to the RequestLine so we don't
reject it as an expression. Doing this requires that the we decode those
markers before submitting the request.

This change updates that logic to only decode the first and last characters
only and not decode the entire payload, since Body values don't require
any type of encoding.

Fixes OpenFeign#916

In certain cases, a Body Template will contain a JSON payload.  To
support this we are asking users to pct-encode the beginning and the
end of the JSON object when providing it to the RequestLine so we don't
reject it as an expression.  Doing this requires that the we decode those
markers before submitting the request.

This change updates that logic to only decode the first and last characters
only and not decode the entire payload, since Body values don't require
any type of encoding.
@kdavisk6 kdavisk6 requested a review from velo March 27, 2019 12:24
@kdavisk6 kdavisk6 added the bug Unexpected or incorrect behavior label Mar 27, 2019
@velo velo added the ready to merge Will be merged if no other member ask for changes label Mar 28, 2019
@kdavisk6 kdavisk6 merged commit 6c4dfbd into OpenFeign:master Apr 8, 2019
@kdavisk6 kdavisk6 added this to the 10.2.1 milestone Apr 28, 2019
@kdavisk6 kdavisk6 deleted the gh-916-decode-error branch May 9, 2019 13:51
@kdavisk6 kdavisk6 removed ready to merge Will be merged if no other member ask for changes labels May 11, 2019
velo pushed a commit that referenced this pull request Oct 7, 2024
Removed decoding from Body Template Expansion

Fixes #916

In certain cases, a Body Template will contain a JSON payload.  To
support this we are asking users to pct-encode the beginning and the
end of the JSON object when providing it to the RequestLine so we don't
reject it as an expression.  Doing this requires that the we decode those
markers before submitting the request.

This change updates that logic to only decode the first and last characters
only and not decode the entire payload, since Body values don't require
any type of encoding.
velo pushed a commit that referenced this pull request Oct 8, 2024
Removed decoding from Body Template Expansion

Fixes #916

In certain cases, a Body Template will contain a JSON payload.  To
support this we are asking users to pct-encode the beginning and the
end of the JSON object when providing it to the RequestLine so we don't
reject it as an expression.  Doing this requires that the we decode those
markers before submitting the request.

This change updates that logic to only decode the first and last characters
only and not decode the entire payload, since Body values don't require
any type of encoding.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Body contains % , as JSON, UriUtils.decode error
2 participants