elixir-mint / mint

Functional HTTP client for Elixir with support for HTTP/1 and HTTP/2 🌱
Apache License 2.0
1.36k stars 112 forks source link

Replace Util.downcase_ascii with String.downcase(&1, :ascii) #424

Closed IceDragon200 closed 7 months ago

IceDragon200 commented 7 months ago

Summary

This PR removes calls to Mint's original downcase_ascii/1 which was found to be slower than Elixir's stock downcase with the :ascii option.

Related

Closes #420

Notes

I unrolled HTTP1.Parser.header_name/1's atom case for clarity, as inline pipes on the same line can be hard to read, I hope this is okay.

whatyouhide commented 7 months ago

I'll fix the warnings locally. Thanks @IceDragon200 💟