Skip to content

Fixes vnd header regression by changing Headers encoding - #348

Merged
codefromthecrypt merged 1 commit into
masterfrom
headers-var-redo
Mar 9, 2016
Merged

codefromthecrypt merged 1 commit into
masterfrom
headers-var-redo

Conversation

@codefromthecrypt

Copy link
Copy Markdown

I mistakenly advised @Headers to follow the encoding rules of @Body.
This was a a mistake as in both cases, url encoding is a bad choice, if
the only goal is to prevent accidental variable expansion. For example,
url encoding interferes a lot with content, including messing with '+'
characters, such as exist in "Accept: application/vnd.github.v3+json"

This changes @Headers to only address the problem, which where a '{'
literal is desired in a header value. The solution offered here is to
simply repeat "{{" when you desire a '{' literal. For example, if your
header value needs to be literally "{{variable}}", you'd encode it as
"{{{{variable}}".

The impact of this change is limited to those who have already started
using v8.15, and a fast release will occur after merge to limit that.

See #326
Fixes #345
Closes #346

I mistakenly advised `@Headers` to follow the encoding rules of `@Body`.
This was a a mistake as in both cases, url encoding is a bad choice, if
the only goal is to prevent accidental variable expansion. For example,
url encoding interferes a lot with content, including messing with '+'
characters, such as exist in "Accept: application/vnd.github.v3+json"

This changes `@Headers` to only address the problem, which where a '{'
literal is desired in a header value. The solution offered here is to
simply repeat "{{" when you desire a '{' literal. For example, if your
header value needs to be literally "{{variable}}", you'd encode it as
"{{{{variable}}".

The impact of this change is limited to those who have already started
using v8.15, and a fast release will occur after merge to limit that.

See #326
Fixes #345
Closes #346
@cloudbees-pull-request-builder

Copy link
Copy Markdown

NetflixOSS » feign » feign-pull-requests #237 SUCCESS
This pull request looks good

@codefromthecrypt

Copy link
Copy Markdown
Author

@marcingrzejszczak @ahus1 I think this is a more sustainable approach to the problem. In hind sight, I wish I did this on the body annotation

@spencergibb

Copy link
Copy Markdown
Contributor

👍

codefromthecrypt pushed a commit that referenced this pull request Mar 9, 2016
Fixes vnd header regression by changing Headers encoding
@codefromthecrypt
codefromthecrypt merged commit d503d05 into master Mar 9, 2016
@codefromthecrypt
codefromthecrypt deleted the headers-var-redo branch March 9, 2016 02:50
@codefromthecrypt codefromthecrypt added this to the 8.15.1 milestone Mar 9, 2016
velo pushed a commit that referenced this pull request Oct 8, 2024
Fixes vnd header regression by changing Headers encoding
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.

3 participants