Skip to content

Commit

Permalink
Fix Nats-Stream-Source header parsing when using multi-filter transforms
Browse files Browse the repository at this point in the history
Signed-off-by: Jean-Noël Moyne <jnmoyne@gmail.com>
  • Loading branch information
jnmoyne committed Aug 16, 2023
1 parent c2d3ef1 commit 0cc43ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -3137,7 +3137,7 @@ func (mset *stream) processInboundSourceMsg(si *sourceInfo, m *inMsg) bool {
// Generate a new (2.10) style source header (stream name, sequence number, source filter, source destination transform).
func (si *sourceInfo) genSourceHeader(reply string) string {
var b strings.Builder
iNameParts := strings.Fields(si.iname)
iNameParts := strings.Split(si.iname, " ")

b.WriteString(iNameParts[0])
b.WriteByte(' ')
Expand Down Expand Up @@ -3186,7 +3186,7 @@ func streamAndSeq(shdr string) (string, string, uint64) {
return streamAndSeqFromAckReply(shdr)
}
// New version which is stream index name <SPC> sequence
fields := strings.Fields(shdr)
fields := strings.Split(shdr, " ")
nFields := len(fields)

if nFields != 2 && nFields <= 3 {
Expand Down

0 comments on commit 0cc43ac

Please sign in to comment.