[6.0] Pass default User-Agent header for for http requests #46553
+59
−11
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.
Pull Request for Issue #46295.
Summary of Changes
After migrating to the Framework HTTP package, some Joomla HTTP requests are sent without a User-Agent header, which can cause servers or firewalls to block them (e.g., during extension updates). This PR resolves the issue by ensuring Joomla’s default User-Agent is applied to these requests.
Testing Instructions
This PR makes change to different part of our code base, it will require carefully code review and approve from at least one maintainer
There are some important areas which needs to be tested:
Use Joomla 6.0.1
Apply patch from this PR
Test update Joomla: Change You Joomla update to use this custom update server: https://artifacts.joomla.org/drone/joomla/joomla-cms/6.0-dev/46553/downloads/89844/pr_list.xml , then run the update and make sure it is updated properly
Test extension update: Install an old version of the extension, for example Akeeba backup 10.0.4 https://www.akeeba.com/download/akeeba-backup/10-0-4.html , then try to update to latest version of the extension uses Joomla updater and make sure it is still working
Test change to Languages model: Access to System - Manage - Languages, click on Install Languages button, make sure there is no error on the next page which display list of languages.
Would be great if you can also test the behavior of the following plugins, but not required
Actual result BEFORE applying this Pull Request
Some http requests sent from Joomla without User-Agent header
Expected result AFTER applying this Pull Request
All http requests sent from Joomla contains User-Agent header
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed