Skip to content

Critical compatibility issue in Kotlin implementation due to MIME type serialization mismatch #260

Closed
@akowal

Description

@akowal

The current serialization of custom MIME types in Kotlin's RSocket implementation is not compatible with other implementations. The issue lies in the handling of the MIME type name's size during serialization and deserialization. Specifically, the Kotlin implementation directly writes the length of the MIME type name as it is:

writeByte(typeBytes.size.toByte()) //write length

Contrarily, other RSocket implementations such as Go and Java adjust the MIME type name length by decreasing it by one when writing and increasing it by one when reading:

This discrepancy makes Kotlin implementation incompatible with all other implementations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions