Skip to content

Use std::string_view in CookieParser::before_handle #1023

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

Open
Sightem opened this issue Apr 17, 2025 · 0 comments · May be fixed by #1024
Open

Use std::string_view in CookieParser::before_handle #1023

Sightem opened this issue Apr 17, 2025 · 0 comments · May be fixed by #1024

Comments

@Sightem
Copy link
Contributor

Sightem commented Apr 17, 2025

The current CookieParser::before_handle implementation creates several std::string objects during the parsing of the Cookie header value. This can be optimized by using std::string_view to slice the header string directly.

Addresses the todo at:

// TODO(dranikpg): remove copies, use string_view with c++17

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 a pull request may close this issue.

1 participant