Skip to content
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

Server sent events are not sent #959

Merged
merged 8 commits into from
Dec 2, 2024
Merged

Conversation

tnotheis
Copy link
Member

@tnotheis tnotheis commented Dec 2, 2024

Readiness checklist

  • I added/updated unit tests.
  • I added/updated integration tests.
  • I ensured that the PR title is good enough for the changelog.
  • I labeled the PR.

This PR fixes multiple issues with server sent events:

  • First and foremost, it URL-encodes the enmeshed address in the URL. Otherwise the HttpClient thinks that the did: part should represent a URL scheme like http: and fails, because it doesn't support this scheme. See 2ed3e96 for the corresponding commit.
  • Due to a recent change to the PushService, it is now required to add ASP.NET Identity to the service collection. See bceae43
  • For some reason, I had to replace AddAuthorization with AddAuthorizationBuilder. Before that, a call to the /api/v1/sse route returned a 302 (a redirect to the auth endpoint). See 64d63cc.
  • I catch the OperationCancelledException in order to prevent it from being logged (this caused a lot of noise before). See 5e8b2f9.
  • I removed the return value from the SseController.Subscribe method. Before it threw an exception in case of a cancelled request, because it tried to return Ok even though there was no response stream to write to (because the request was cancelled). See 3d47ac7.

@tnotheis tnotheis added the bug Something isn't working label Dec 2, 2024
@tnotheis tnotheis self-assigned this Dec 2, 2024
@tnotheis tnotheis enabled auto-merge (squash) December 2, 2024 15:13
@tnotheis tnotheis merged commit db30b05 into main Dec 2, 2024
26 checks passed
@tnotheis tnotheis deleted the server-sent-events-are-not-sent branch December 2, 2024 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants