Skip to content

Do not convert @Header name when the name is specified#5841

Merged
minwoox merged 3 commits intoline:mainfrom
minwoox:header_name
Jul 30, 2024
Merged

Do not convert @Header name when the name is specified#5841
minwoox merged 3 commits intoline:mainfrom
minwoox:header_name

Conversation

@minwoox
Copy link
Copy Markdown
Contributor

@minwoox minwoox commented Jul 29, 2024

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:

  • 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.

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.
}

@Post("/headerNameSpecified")
public String headerNameSpecified(@Header("X-Line-Id") String id) {
Copy link
Copy Markdown
Member

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 ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks updated. 😉

@minwoox minwoox added this to the 1.29.4 milestone Jul 29, 2024
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jul 29, 2024

Copy link
Copy Markdown
Contributor

@ikhoon ikhoon left a comment

Choose a reason for hiding this comment

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

Thanks!

}

/**
* Returns the value of the {@link Header} annotation which is specified on the {@code element} if
Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, fixed. 😉

Copy link
Copy Markdown
Contributor

@jrhee17 jrhee17 left a comment

Choose a reason for hiding this comment

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

👍 👍 👍 👍

@minwoox minwoox merged commit cd1973b into line:main Jul 30, 2024
@minwoox minwoox deleted the header_name branch July 30, 2024 05:44
minwoox added a commit to minwoox/armeria that referenced this pull request Jul 30, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants