Skip to content

rtsp: refactor method handling and improve error checks - #22505

Closed
bagder wants to merge 7 commits into
masterfrom
bagder/rtsp-table
Closed

bagder wants to merge 7 commits into
masterfrom
bagder/rtsp-table

Conversation

@bagder

@bagder bagder commented Aug 6, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request refactors internal RTSP request-method handling to use the public CURL_RTSPREQ_* values directly, simplifying method selection and consolidating header construction/error handling in the RTSP implementation.

Changes:

  • Replace the internal Curl_RtspReq enum with an unsigned char request selector stored on data->set.
  • Refactor RTSP method selection into a table-driven helper (pick_method) and centralize header allocation (rtsp_header_alloc).
  • Tighten CURLOPT_RTSP_REQUEST validation to a simple range check and include RTSP request constants via lib/rtsp.h.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
lib/urldata.h Removes internal RTSP request enum and stores request type as unsigned char in UserDefined.
lib/transfer.c Includes rtsp.h to access RTSP request constants in transfer-layer logic.
lib/setopt.c Simplifies RTSP request option parsing/validation and stores the request value directly.
lib/rtsp.h Adds internal RTSPREQ_* aliases mapping to public CURL_RTSPREQ_* constants.
lib/rtsp.c Refactors RTSP request creation into smaller helpers and table-driven method handling.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/rtsp.c
@bagder bagder closed this in 26b9f3a Aug 6, 2026
@bagder
bagder deleted the bagder/rtsp-table branch August 6, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants