Skip to content

urldata: drop four strings from the 'aptr' struct - #22603

Closed
bagder wants to merge 4 commits into
masterfrom
bagder/urldata-rtsp_transport
Closed

bagder wants to merge 4 commits into
masterfrom
bagder/urldata-rtsp_transport

Conversation

@bagder

@bagder bagder commented Aug 17, 2026

Copy link
Copy Markdown
Member

There is no need to keep this data around once the RTSP request has been issued.

This comment was marked as outdated.

@bagder bagder changed the title urldata: drop 'rtsp_transport' urldata: drop four strings from the 'aptr' struct Aug 17, 2026
@testclutch

This comment was marked as outdated.

@bagder
bagder marked this pull request as ready for review August 17, 2026 11:02
- 'rtsp_transport'

  There is no need to keep this data around once the RTSP request has been
  issued.

- 'accept_encoding'

  Only needed when creating the RTSP request.

- 'uagent'

  The header is generated on demand from set.str[STRING_USERAGENT]

- 'ref'

  Not necesary to keep around

Closes #22603

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

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

Suppressed comments (2)

lib/rtsp.c:560

  • block.referrer is allocated for every RTSP request with a configured referrer, but unlike the other request-local strings it is never freed on exit. This leaks the formatted header after both successful and failed requests.
  curlx_free(block.accept_encoding);

lib/rtsp.c:509

  • A custom RTSP User-Agent no longer suppresses CURLOPT_USERAGENT. Curl_add_custom_headers() later appends the custom header, so requests containing both settings now send two User-Agent fields. Preserve the previous precedence by checking Curl_checkheaders() before generating this header.
  if(!result &&
     data->set.str[STRING_USERAGENT] && *data->set.str[STRING_USERAGENT])
    result = curlx_dyn_addf(&req_buffer,
                            "User-Agent: %s\r\n",
                            data->set.str[STRING_USERAGENT]);

@bagder
bagder force-pushed the bagder/urldata-rtsp_transport branch from d2aaa70 to ef3dd47 Compare August 17, 2026 11:13

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

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

@bagder bagder closed this in 5406d26 Aug 17, 2026
@bagder
bagder deleted the bagder/urldata-rtsp_transport branch August 17, 2026 12:04
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.

3 participants