[PR #1124] [MERGED] Fixing MsgPack headers type and support mobile SignalR #2889

Closed
opened 2026-03-03 09:08:49 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/1124
Author: @aaxdev
Created: 8/31/2020
Status: Merged
Merged: 9/3/2020
Merged by: @dani-garcia

Base: masterHead: fix/support-mobile-signalr-msgpack


📝 Commits (2)

  • c59cfe3 Fix MsgPack headers and support mobile SignalR
  • 260ffee Improving code

📊 Changes

1 file changed (+37 additions, -29 deletions)

View changed files

📝 src/api/notifications.rs (+37 -29)

📄 Description

The type of the field "headers" in MsgPack structure seems to be a Map instead of an Array.
This cause crashes with the package SignalR C# client, but not with the Typescript one used by desktop/browser clients.

The package SignalR is also checking if the client is a browser, and will set a header value or a query parameter according the case (see here).

So, a dedicated function to resolve any of them seemed better.

Now notifications should works with any SignalR/MsgPack packages, i'm needing this to continue to implement notifications on mobile app.

Thanks @BlackDex for helping about research and for the code improvement, i'm new with the rust lang.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/dani-garcia/vaultwarden/pull/1124 **Author:** [@aaxdev](https://github.com/aaxdev) **Created:** 8/31/2020 **Status:** ✅ Merged **Merged:** 9/3/2020 **Merged by:** [@dani-garcia](https://github.com/dani-garcia) **Base:** `master` ← **Head:** `fix/support-mobile-signalr-msgpack` --- ### 📝 Commits (2) - [`c59cfe3`](https://github.com/dani-garcia/vaultwarden/commit/c59cfe33717c19caef913d35181bf3108b7b93f3) Fix MsgPack headers and support mobile SignalR - [`260ffee`](https://github.com/dani-garcia/vaultwarden/commit/260ffee093b8c7bea084a338ec8abb4544d0086d) Improving code ### 📊 Changes **1 file changed** (+37 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `src/api/notifications.rs` (+37 -29) </details> ### 📄 Description The type of the field "headers" in MsgPack structure seems to be a Map instead of an Array. This cause crashes with the package SignalR C# client, but not with the Typescript one used by desktop/browser clients. The package SignalR is also checking if the client is a browser, and will set a header value or a query parameter according the case ([see here](https://github.com/dotnet/aspnetcore/blob/7a65454466e0f17b7879794205e3887471f5839e/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/WebSocketsTransport.cs#L127)). So, a dedicated function to resolve any of them seemed better. Now notifications should works with any SignalR/MsgPack packages, i'm needing this to continue to implement notifications on mobile app. Thanks @BlackDex for helping about research and for the code improvement, i'm new with the rust lang. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 09:08:49 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vaultwarden#2889
No description provided.