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

Metadata (M) flag is not set from responder side when metadata has length #198

Open
viglucci opened this issue Dec 10, 2021 · 5 comments
Open
Labels
0.x Issues relating to 0.x version(s) bug

Comments

@viglucci
Copy link
Member

viglucci commented Dec 10, 2021

In _sendStreamPayload of RSocketMachineImpl, when flags is created, the flag for present Metadata (M) is not set, which causes the payload.metadata value to not be included in the encoded payload later in serializePayloadFrame.

https://github.com/rsocket/rsocket-js/blob/master/packages/rsocket-core/src/RSocketMachine.js#L885

Expected Behavior

Per spec, Metadata (M) flag must be set when the payload contains metadata.

Actual Behavior

Metadata (M) flag is not set, and the resulting encoded payload does not include metadata.

Steps to Reproduce

Attempt to send any metadata value on a payload from requestResponse or requestStream, the value received on the client will be null.

Possible Solution

if (metadata && metadata.length > 0) {
  // eslint-disable-next-line no-bitwise
  flags |= _RSocketFrame.FLAGS.METADATA;
}

Your Environment

  • RSocket version(s) used: 0.0.27
  • Other relevant libraries versions (eg. netty, ...): n/a
  • Platform (eg. JVM version (javar -version) or Node version (node --version)): v16.13.1
  • OS and version (eg uname -a): Windows
@sudongyuer
Copy link

Thanks ~

@sudongyuer
Copy link

I use[ Buffer.from] api, and website metadata still null , i don't known why

@genesys-ppotapov
Copy link

@viglucci, @OlegDokuka, I see this issue is fixed in #200 two months ago. When do you plan to release fixed version?

@viglucci
Copy link
Member Author

viglucci commented Mar 6, 2022

Hi @genesys-ppotapov, unfortunately, we can't give a firm timeline for our next release at the moment. We are working towards cutting some releases, both for the existing 0.x, as well as a 1.0.0-alpha, but I don't have any firm dates to share at this time.

@viglucci viglucci added the bug label Mar 6, 2022
@genesys-ppotapov
Copy link

@viglucci, I see. Thank you for the information.

@viglucci viglucci added the 0.x Issues relating to 0.x version(s) label Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.x Issues relating to 0.x version(s) bug
Projects
None yet
Development

No branches or pull requests

3 participants