I ran into a problem when testing two clients that use custom headers.
The headers were only passed on from client A to client B, but not from client B to client A, even though the headers were defined in proxyRequestHeaders and proxyResponseHeaders.
The issue is that client A defines the header in all lower case, and client B use mixed case.
proxyRequestHeaders and proxyResponseHeaders need an exact match, including case so I would have to define all variants of casing (or at least the ones that are likely to occur) in order to proxy the headers. This also made checking for these headers quite messy since we needed to disregard the casing manually.
To me it makes sense to leave case as-is when proxying requests, but we should be able to find headers via "has" and "get" without having to match the case.
I'm not a big fan of exposing the "getHeaderName" method in SipMessage, but I haven't come up with a nicer way to handle this.
I ran into a problem when testing two clients that use custom headers. The headers were only passed on from client A to client B, but not from client B to client A, even though the headers were defined in proxyRequestHeaders and proxyResponseHeaders. The issue is that client A defines the header in all lower case, and client B use mixed case. proxyRequestHeaders and proxyResponseHeaders need an exact match, including case so I would have to define all variants of casing (or at least the ones that are likely to occur) in order to proxy the headers. This also made checking for these headers quite messy since we needed to disregard the casing manually.
To me it makes sense to leave case as-is when proxying requests, but we should be able to find headers via "has" and "get" without having to match the case.
I'm not a big fan of exposing the "getHeaderName" method in SipMessage, but I haven't come up with a nicer way to handle this.