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

Provide a way to composite two headers #5146

Open
ikhoon opened this issue Aug 24, 2023 · 2 comments
Open

Provide a way to composite two headers #5146

ikhoon opened this issue Aug 24, 2023 · 2 comments

Comments

@ikhoon
Copy link
Contributor

ikhoon commented Aug 24, 2023

When writing headers, merging headers occupies a large part of CPU cycles.

public static ResponseHeaders mergeResponseHeaders(ResponseHeaders headers,

image

Armeria headers are immutable so it is possible to composite the existing headers to avoid the expensive copy operations.

RequestHeaders compositeHeaders = 
  RequestHeaders.wrap(requestheaders, additionalHeaders, defaultHeaders);
@injae-kim
Copy link
Contributor

oh what an interesting issue! I'll handle this. please assign to me~! 🙇

@injae-kim
Copy link
Contributor

FYI) I'm almost done first PR~! (only a few unit-test left). I'll create PR within tomorrow!

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

No branches or pull requests

2 participants