Project

General

Profile

« Previous | Next » 

Revision 0300ea5a

Added by Josh Nichols almost 2 years ago

[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.

Instead of doing that, save the result so it can be re-used.

https://github.com/ruby/net-http/commit/179976f7ea