This implements a plaintext reading of RFC 6797, which says to only consider the
first, however it slightly conflicts with RFC 7230, which says that sending
multiple headers which can't be merged is illegal (except for a specific
whitelist which HSTS isn't in). Chrome also implements HSTS using RFC 6797's
description of the parsing algorithm.
r=mcmanus,keeler
MozReview-Commit-ID: E06uIk2IcEK
--HG--
extra : rebase_source : 4a67f067d2953d4b30c1019a61bbfc7073e55b3d
This eliminates some of the pointer math and makes the method a bit safer.
The function's behaviour remains the same as before.
MozReview-Commit-ID: 94wBk6xvkd6
--HG--
extra : rebase_source : 9fac33114b16d0910e63b474222acf0bc1db500f
While writing a gtest I discovered the parsing an IPv6 address didn't work due to the brackets.
MozReview-Commit-ID: 9mmKS72hf7Y
--HG--
extra : rebase_source : 757a19a50a50b2af232f0b44f6faacf7280b554a