You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just wanted to add this issue here in case others run into the same issue when using this library.
When using a header that contains ";", retrieving the value using "TryGetValues" from System.Net.Http, it adds an extra space between the texts that contain ";"
if (!messageHeader.TryGetValues(matchHeader.Key, out var values) || values == null)
So for example:
If we pass in "application/xml;version=1", when we parse the value from the header it comes out as "application/xml; version=1". This causes the "MatchesHeader" method to fail and not match because of the extra space within the string.
I believe this to be an error in Microsoft's part but is an issue that could be mitigated in this library by maybe using a different method of retrieving the header value. Who knows if and when Microsoft will end up changing their code for retrieving the header value.
The text was updated successfully, but these errors were encountered:
I just wanted to add this issue here in case others run into the same issue when using this library.
When using a header that contains ";", retrieving the value using "TryGetValues" from System.Net.Http, it adds an extra space between the texts that contain ";"
if (!messageHeader.TryGetValues(matchHeader.Key, out var values) || values == null)
So for example:
If we pass in "application/xml;version=1", when we parse the value from the header it comes out as "application/xml; version=1". This causes the "MatchesHeader" method to fail and not match because of the extra space within the string.
I believe this to be an error in Microsoft's part but is an issue that could be mitigated in this library by maybe using a different method of retrieving the header value. Who knows if and when Microsoft will end up changing their code for retrieving the header value.
The text was updated successfully, but these errors were encountered: