This fixes two bugs I found when force_response_body_encoding (#17) is enabled.
scanning_meta only checks the first meta element
an attribute with no content (for example, <meta name='keywords' content=''>) breaks get_attribute
The scanning_meta change makes the code more similar to the original sniffing patch in https://bugs.ruby-lang.org/issues/2567. There may be an issue with the while and large content bodies. Maybe it should stop at <body> as well?
This fixes two bugs I found when
force_response_body_encoding
(#17) is enabled.scanning_meta
only checks the firstmeta
element<meta name='keywords' content=''>
) breaksget_attribute
The
scanning_meta
change makes the code more similar to the original sniffing patch in https://bugs.ruby-lang.org/issues/2567. There may be an issue with thewhile
and large content bodies. Maybe it should stop at<body>
as well?