Skip to content

Conversation

@flownzu
Copy link
Contributor

@flownzu flownzu commented Oct 21, 2018

Should fix the issue #293

@JohnnyCrazy
Copy link
Owner

Thanks 👍

I wonder if there is a more performant way, maybe we we need to create HttpRequestMessage objects to set the headers per message. However, we can do this later.

@JohnnyCrazy JohnnyCrazy merged commit 9859e9d into JohnnyCrazy:master Oct 24, 2018
@OmiCron07
Copy link

I pulled this merge and now I have an exception with ResumePlayback on this line:
if (_client.DefaultRequestHeaders.Contains(headerPair.Key))

System.InvalidOperationException: 'Misused header name. Make sure request headers are used with HttpRequestMessage, response headers with HttpResponseMessage, and content headers with HttpContent objects.'

@flownzu
Copy link
Contributor Author

flownzu commented Oct 27, 2018

Looks like even checking if the default request header collection contains a certain header validates the header name...

The only way to remove the header and not add duplicate values is to actually clear the whole header collection since Remove checks the header name as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants