Skip to content

Refactor RTSP client: modern parsing & structured logging#1654

Merged
sipsorcery merged 1 commit into
sipsorcery-org:masterfrom
paulomorgado:strings-5
Jun 1, 2026
Merged

Refactor RTSP client: modern parsing & structured logging#1654
sipsorcery merged 1 commit into
sipsorcery-org:masterfrom
paulomorgado:strings-5

Conversation

@paulomorgado
Copy link
Copy Markdown
Contributor

Refactored RTSP client and protocol parsing for better performance, maintainability, and logging. Adopted structured logging, Span-based parsing, and efficient string handling. Improved exception messages, header normalization, and ToString() methods. Cleaned up code and enhanced error handling throughout.

Split of #1639

sipsorcery added a commit that referenced this pull request Jun 1, 2026
SplitHeaders performs RTSP header line-folding (collapsing continuation
lines that begin with whitespace) and normalisation of malformed
carriage-return line endings, but had no direct test coverage; it was
only exercised indirectly via well-formed round-trip messages.

These characterisation tests lock in the existing behaviour:
- basic CRLF-separated splitting
- continuation line folded with a leading space
- continuation line folded with a leading tab
- lone "\r " (CR + space) treated as a line break

Verified to pass against both the current regex-based implementation and
the span-based rewrite in #1654, confirming the two are equivalent.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Refactored RTSP client and protocol parsing for better performance, maintainability, and logging. Adopted structured logging, Span<T>-based parsing, and efficient string handling. Improved exception messages, header normalization, and ToString() methods. Cleaned up code and enhanced error handling throughout.
@sipsorcery sipsorcery merged commit 225641e into sipsorcery-org:master Jun 1, 2026
6 checks passed
@paulomorgado paulomorgado deleted the strings-5 branch June 1, 2026 14:26
@paulomorgado paulomorgado mentioned this pull request Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants