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 Dec 24, 2025
Merged
Conversation
…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>
Contributor
There was a problem hiding this comment.
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
test/gstTestHarness/downloader.cpp
Outdated
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://" ) ) | ||
| { |
There was a problem hiding this comment.
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"); |
…https downloads Signed-off-by: Philip Stroffolino <philip_stroffolino@cable.comcast.com>
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.
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