You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
The text was updated successfully, but these errors were encountered:
akowal
changed the title
Critical compatibility issue in Kotlin Implementation due to MIME type serialization mismatch
Critical compatibility issue in Kotlin implementation due to MIME type serialization mismatch
Apr 26, 2024
akowal
added a commit
to akowal/rsocket-kotlin
that referenced
this issue
Apr 26, 2024
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:
rsocket-kotlin/rsocket-core/src/commonMain/kotlin/io/rsocket/kotlin/frame/io/mimeType.kt
Line 50 in 2239c5c
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.
The text was updated successfully, but these errors were encountered: