Skip to content

Avoid allocating a Vec while detecting gzip support#28

Open
mateocabanal wants to merge 1 commit intomainfrom
opt/gzip-detect-without-vec
Open

Avoid allocating a Vec while detecting gzip support#28
mateocabanal wants to merge 1 commit intomainfrom
opt/gzip-detect-without-vec

Conversation

@mateocabanal
Copy link
Copy Markdown
Owner

Summary

  • replace split(',').map(...).collect::<Vec<_>>() with any(...)
  • avoid allocating an intermediate vector for Accept-Encoding parsing
  • preserve existing gzip detection behavior while making it case-insensitive

Notes

This is intentionally tiny and only touches the synchronous request path.

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.

1 participant