[ruby/net-http] Improve performance of HTTPHeader#content_type
In the existing implementation, main_type and sub_type would end up being called multiple times potentially.
main_type
sub_type
Instead of doing that, save the result so it can be re-used.
https://github.com/ruby/net-http/commit/179976f7ea
[ruby/net-http] Improve performance of HTTPHeader#content_type
In the existing implementation,
main_type
andsub_type
would end upbeing called multiple times potentially.
Instead of doing that, save the result so it can be re-used.
https://github.com/ruby/net-http/commit/179976f7ea