-
Notifications
You must be signed in to change notification settings - Fork 925
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
Do not convert @Header
name when the name is specified
#5841
Conversation
Motivation: We must not convert the header name specified in `@Header` when creating an annotated service. Modifications: - Do not convert the header name specified in `@Header`. Result: - An annotated service that has a `@Header` with the specified name now works correctly.
@@ -773,6 +773,12 @@ public String customHeader5(@Header List<Integer> numbers, | |||
String.join(":", strings); | |||
} | |||
|
|||
@Post("/headerNameSpecified") | |||
public String headerNameSpecified(@Header("X-Line-Id") String id) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use more peculiar casing? e.g. X-x-FoO-bAr
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks updated. 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@@ -44,6 +44,27 @@ static String findName(Object nameRetrievalTarget, String value) { | |||
return getName(nameRetrievalTarget); | |||
} | |||
|
|||
/** | |||
* Returns the value of the {@link Header} annotation which is specified on the {@code element} if |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shoud we update Javadoc of the method above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, fixed. 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 👍 👍 👍
Motivation: We must not convert the header name specified in `@Header` when creating an annotated service. This is a regression introduced by line#5547, affecting 1.29.0 through 1.29.3. Modifications: - Do not convert the header name specified in `@Header`. Result: - An annotated service that has a `@Header` with the specified name now works correctly.
Motivation:
We must not convert the header name specified in
@Header
when creating an annotated service.This is a regression introduced by #5547, affecting 1.29.0 through 1.29.3.
Modifications:
@Header
.Result:
@Header
with the specified name now works correctly.