-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Adding accept header to callsites within SignalR #55271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding accept header to callsites within SignalR #55271
Conversation
…reateHttpClient()
…value on relevant call sites
…pt header in NegotiateAsync()
Are you actually changing anything, or just kicking the build? If it's kicking the build please stop.
|
Looks like you're missing negotiate? Otherwise I think that covers all the spots. |
…attyLeslie/aspnetcore into SignalR--Missing-Accept-Header
Thank you very much for the insight @BrennanConroy. I believe I have completed all the necessary tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some cleanup comments
src/SignalR/clients/csharp/Client/test/UnitTests/HttpConnectionTests.cs
Outdated
Show resolved
Hide resolved
src/SignalR/clients/csharp/Client/test/UnitTests/LongPollingTransportTests.cs
Outdated
Show resolved
Hide resolved
src/SignalR/clients/csharp/Client/test/UnitTests/HttpConnectionTests.cs
Outdated
Show resolved
Hide resolved
src/SignalR/clients/csharp/Client/test/UnitTests/LongPollingTransportTests.cs
Outdated
Show resolved
Hide resolved
src/SignalR/clients/csharp/Client/test/UnitTests/LongPollingTransportTests.cs
Outdated
Show resolved
Hide resolved
…tively handle the intial http request and the requests in Poll()
@BrennanConroy, it seems functional tests from MVC are failing due to |
Ignore it, I'll rerun the tests if I don't have any more comments after reviewing later today. |
src/SignalR/clients/csharp/Client/test/UnitTests/HttpConnectionTests.cs
Outdated
Show resolved
Hide resolved
src/SignalR/clients/csharp/Client/test/UnitTests/LongPollingTransportTests.cs
Outdated
Show resolved
Hide resolved
src/SignalR/clients/csharp/Client/test/UnitTests/ServerSentEventsTransportTests.cs
Outdated
Show resolved
Hide resolved
src/SignalR/clients/csharp/Client/test/UnitTests/LongPollingTransportTests.cs
Outdated
Show resolved
Hide resolved
src/SignalR/clients/csharp/Client/test/UnitTests/LongPollingTransportTests.cs
Outdated
Show resolved
Hide resolved
…outs and using testUri
…attyLeslie/aspnetcore into SignalR--Missing-Accept-Header
Thanks @MattyLeslie! Sorry for all the nit-picky comments 😄 |
Adding accept header to callsites within SignalR
Summary of the changes
As mentioned in #47398, many of the
HttpClient
call sites within the SignalR library were missing their appropriate accept headers. This change aims to address that issue.Description
Changes made include:
NegotiateAsync()
withinHttpConnection
to ensure header is present for negotiation requests.SendMessage()
withinSendUtils
for thesend
requests.Poll()
withinLongPollingTransport
for theget
request.LongPollingTransport
have the correct accept headerServerSentEventsTransport
has the correct accept headerHttpConnection
has the correct accept header.Fixes #47398 by ensuring the negotiation requests and other HttpClient call sites of SignalR are made with the relevant accept header.