Skip to content

Commit

Permalink
runtimes/core: fix stream handshake with only path parameters (#1730)
Browse files Browse the repository at this point in the history
Previously we did not parse the handshake request for data if the
handshake only consisted of path parameters
  • Loading branch information
fredr authored Jan 22, 2025
1 parent 136727f commit 3ceef63
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion runtimes/core/src/api/schema/encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,14 @@ pub fn handshake_encoding(
let rpc_path = rpc.path.as_ref().unwrap_or(&default_path);

let Some(handshake_schema) = &rpc.handshake_schema else {
let parse_data = rpc.path.as_ref().is_some_and(|path| {
path.segments
.iter()
.any(|segment| segment.r#type() != SegmentType::Literal)
});

return Ok(Some(HandshakeSchemaUnderConstruction {
parse_data: false,
parse_data,
schema: SchemaUnderConstruction {
combined: None,
body: None,
Expand Down

0 comments on commit 3ceef63

Please sign in to comment.