Subject is always read as ASCII, not UTF-8#1025
Conversation
|
thanks for the fix @aafloy looks good. sorry for the red tape but could you sign your commit before i can merge please? thank you 🙏 |
| public const int Ping = 1196312912; // Encoding.UTF8.GetBytes("PING") |> MemoryMarshal.Read<int> | ||
| public const int Pong = 1196314448; // Encoding.UTF8.GetBytes("PONG") |> MemoryMarshal.Read<int> | ||
| public const int Ok = 223039275; // Encoding.UTF8.GetBytes("+OK\r") |> MemoryMarshal.Read<int> | ||
| public const int Error = 1381123373; // Encoding.UTF8.GetBytes("-ERR") |> MemoryMarshal.Read<int> |
There was a problem hiding this comment.
no need to change these comments. ASCII is valid here.
|
hey @aafloy just a reminder that I can't merge your change if you don't sign the commit unfortunately. You should be able to follow this help page if you haven't done it before https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits of course there is no rush. please take your time. Grateful for your contribution. thanks again. |
|
should we also change these defaults? nats.net/src/NATS.Client.Core/NatsOpts.cs Lines 116 to 118 in 4856762 |
Fix the issue of #1023 by parsing subject with UTF8 as outlined in the protocol convention.
Since NatsOpts contains a SubjectEncoding, the fix ideally should use this, however, the protocol convention is clear on what encoding the subject is, so I would argue that the NatsOpts.SubjectEncoding should be removed.