Always send Content-Length, even if body is None#31
Merged
Conversation
This could be the case if you're sending dialog.ringing(Some(headers, None))
…iented transports (TCP), Content-Length MUST be specified. Removed Header::MaxForwards from response because this is a request only header.
Contributor
|
Thanks |
Contributor
Author
|
Some context on this. I'm using flexisip (an intercom) which only manages TCP transport decently. I was trying the registration sample and sending SIP MESSAGE to rsipstack through the flexisip. It seemed like the messages were arriving and that the OK reply were being sent correctly. However the communication would stop after a few MESSAGE calls being received. It seemed like flexisip was not get really getting the 200 OK replies at all (or at least ignoring them), because the Content-Length was not set. Because the stream is TCP. The spec requires the boundaries for the Content to be defined. If there is no body, it should be 0 and the header should always be sent so that the boundaries can be calculated. |
FedorKiselev76
pushed a commit
to FedorKiselev76/rsipstack
that referenced
this pull request
Dec 28, 2025
Always send Content-Length, even if body is None
yeoleobun
pushed a commit
to yeoleobun/rsipstack
that referenced
this pull request
Dec 29, 2025
fix(tts): fix test in tts track
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This could be the case if you're sending dialog.ringing(Some(headers, None))