This one is not clear-cut. There are a couple of different options for how we could handle this.
This PR implements the more backwards compatible approach which is to align with getHeader() and state that if there are multiple headers with the same name, only the first is used.
Alternatives include:
throw an exception if there is more than one header with the given name
throw an exception if there is more than one header with the given name and the values are not identical (return the value if they are identical).
something else
Given the potential for breakage if an exception is thrown, I think alignment with getHeader() is the way to go.
Fixes #325
This one is not clear-cut. There are a couple of different options for how we could handle this.
This PR implements the more backwards compatible approach which is to align with
getHeader()
and state that if there are multiple headers with the same name, only the first is used.Alternatives include:
Given the potential for breakage if an exception is thrown, I think alignment with
getHeader()
is the way to go.