-
Notifications
You must be signed in to change notification settings - Fork 42
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
Improperly formed default mime type causes connection error when connecting to spring-boot rsocket server #20
Comments
Well, it feels like the problem comes from the library in the RSocketOptions.cs file : public class RSocketOptions
{
public const int INITIALDEFAULT = int.MinValue;
public const string BINARYMIMETYPE = "binary";
public TimeSpan KeepAlive { get; set; }
public TimeSpan Lifetime { get; set; }
public string DataMimeType { get; set; }
public string MetadataMimeType { get; set; }
public int InitialRequestSize { get; set; } = 10;
public int GetInitialRequestSize(int initial) => (initial <= INITIALDEFAULT) ? InitialRequestSize : initial;
public static readonly RSocketOptions Default = new RSocketOptions()
{
KeepAlive = TimeSpan.FromMinutes(1),
Lifetime = TimeSpan.FromMinutes(3),
DataMimeType = BINARYMIMETYPE,
MetadataMimeType = BINARYMIMETYPE,
};
} I Changed public const string BINARYMIMETYPE = "binary"; to public const string BINARYMIMETYPE = "application/x-protobuf"; now the next problem is how to deserialize in the spring boot application. |
Hi @broadside74 ! We have improperly formed mime-type which should be Thanks for finding that. Feel free to create a PR or otherwise I will do that shortl. Cheers, |
Also, you can use your custom data mime type by overriding the default. I will provide an example shortly |
@broadside74 You may modify the default mime-type using the following
|
closed with #21 |
Hi everyone, I'm currently using v0.2.7 from Nuget Package Manager, and the RSocketOptions class in there has the BINARYMIMETYPE set to "binary", throwing me the same error; Which version has the BINARYMIMETYPE change? I've tried changing the options as shown below, but the same error occurs; Thanks! |
@foyss can you please check if you really use the latest one since right now RSocketOptions has a different value set -> https://github.com/rsocket/rsocket-net/blob/master/RSocket.Core/RSocketOptions.cs#L17 |
Oh, my bad, this change was not released yet, my apologies for the misleading comment. I will do a release shortly |
@foyss can you try setting |
@OlegDokuka Hi Oleg, I've tried the above but they seem to give the same error |
@foyss can you please enable the following logger
and share what is coming to the spring server |
@OlegDokuka My colleague is unsure on how to enable the following logger on Spring Boot, but the following is shown in the console log once I try to .RequestStream |
I've set up the FrameLogger and set the level to DEBUG, but the console message seems to report to same message as above |
@foyss can you please set a breakpoint at this line -> https://github.com/rsocket/rsocket-net/blob/master/RSocket.Core/RSocketClient.cs#L25 and say what is in the given options |
@OlegDokuka I'm unable to step into the nuget package from my console app, but I'm able to see the options here; Here is an image of the whole client obj; |
Hi @OlegDokuka Is there any update on this or an ETA on the new release please? Kind regards |
@foyss can you try passing options directly into
that should fix your problem |
Hi @OlegDokuka, I've tried solution you suggested and it works! :) Saves me from recompiling it. Thanks for the help |
Hi everyone,
I have a Spring Boot RSocket server and I am unable to connect to it with your example. I got a rejected Setup :
0000 Error {000}: [00000003] Invalid mime type "binary": does not contain '/'
I tried some options in RSocketOptions but alyaws the same error
Here is my spring server config :
Here is my dotnet program
The server is working, I did manage to handle RSocket data with another spring boot client.
Thanks for your help !
The text was updated successfully, but these errors were encountered: