Skip to content

VPLAY-12256 gst test harness not populating any user agent - results n http 403 from some servers#793

Merged
pstroffolino merged 2 commits intodev_sprint_25_2from
feature/VPLAY-12256
Dec 24, 2025
Merged

VPLAY-12256 gst test harness not populating any user agent - results n http 403 from some servers#793
pstroffolino merged 2 commits intodev_sprint_25_2from
feature/VPLAY-12256

Conversation

@pstroffolino
Copy link
Copy Markdown
Contributor

VPLAY-12256 gst test harness not populating any user agent - results n http 403 from some servers

Reason for Change: add gstTestHarness/1.0 for user agent

Test Guidance: play test guidnce from aampcdn server

Risk: None

…in http 403 from some servers

Reason for Change: add gstTestHarness/1.0 for user agent

Test Guidance: play test guidnce from aampcdn server

Risk: None

Signed-off-by: Philip Stroffolino <philip_stroffolino@cable.comcast.com>
Copilot AI review requested due to automatic review settings December 24, 2025 19:08
@pstroffolino pstroffolino requested a review from a team as a code owner December 24, 2025 19:08
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a User-Agent header ("gstTestHarness/1.0") to HTTP requests made by the gstTestHarness downloader to prevent HTTP 403 errors from servers that require this header.

Key Changes:

  • Adds User-Agent string to curl configuration in the test harness downloader

Comment on lines 133 to 135
curl_easy_setopt(context.curl, CURLOPT_USERAGENT, "gstTestHarness/1.0");
if( starts_with(url,"http://") || starts_with(url,"https://" ) )
{
Copy link

Copilot AI Dec 24, 2025

Choose a reason for hiding this comment

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

The User-Agent is being set unconditionally for all URLs, including file:// URLs where it is not needed. This call should be moved inside the HTTP/HTTPS conditional block (after line 134) to avoid unnecessary CURL operations for local file access. Additionally, for consistency with the other curl_easy_setopt calls in this function, the return value should be explicitly voided using (void).

Suggested change
curl_easy_setopt(context.curl, CURLOPT_USERAGENT, "gstTestHarness/1.0");
if( starts_with(url,"http://") || starts_with(url,"https://" ) )
{
if( starts_with(url,"http://") || starts_with(url,"https://" ) )
{
(void)curl_easy_setopt(context.curl, CURLOPT_USERAGENT, "gstTestHarness/1.0");

Copilot uses AI. Check for mistakes.
…https downloads

Signed-off-by: Philip Stroffolino <philip_stroffolino@cable.comcast.com>
@pstroffolino pstroffolino merged commit 4efa8cb into dev_sprint_25_2 Dec 24, 2025
5 of 6 checks passed
@pstroffolino pstroffolino deleted the feature/VPLAY-12256 branch December 24, 2025 19:17
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