Cookies with a SameSite attribute cause a warning to be output
https://github.com/nahi/httpclient/blob/27fbb07685930d1c8dbdc8dd1e72027f79879bbe/lib/httpclient/webagent-cookie.rb#L187
The case statement in the parse function of the Cookie class does not expect the "SameSite" attribute of a cookie. Servers will send this attribute, which causes unnecessary output.
I believe that this can be temporarily fixed by adding an empty when clause before the else clause:
...
when 'samesite'
else
...
A proper fix should probably add an attr_accessor :samesite and other code to manage the potential values for the "SameSite" attribute.
Since Ruby 2.5 there's the Warning module that one can use to customise Kernel#warn. The gem warning adds some extra utils.
We've used it as follows to silence this annoying line:
# Add to gemfile
gem `warnings`
# Add to your codebase:
Warning.ignore(/Unknown key: SameSite = Lax/)
Since Ruby 2.5 there's the
Warningmodule that one can use to customiseKernel#warn. The gemwarningadds some extra utils.We've used it as follows to silence this annoying line:
# Add to gemfile gem `warnings` # Add to your codebase: Warning.ignore(/Unknown key: SameSite = Lax/)
works as long as you install "warning" and not "warnings"