feat: add user-agent when testing extension URLs#372
Merged
Conversation
MightyCreak
force-pushed
the
feat/add-user-agent
branch
7 times, most recently
from
July 1, 2026 05:32
f17a9fa to
20a0a3c
Compare
This is to better identify the Mesamatrix script when it's crawling external websites such as khronos.org and vulkan.org. It also add a new page to explain what the bot does. Also closed a bracket in a string, in UrlCache.php.
MightyCreak
force-pushed
the
feat/add-user-agent
branch
from
July 1, 2026 05:38
20a0a3c to
66eadef
Compare
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.
This PR adds a user agent when fetching the headers of the external URLs. This is to better identify the Mesamatrix script when it's crawling external websites such as khronos.org and vulkan.org. It also adds a new page to explain what the bot does.
I didn't know which string to chose as the standard seems pretty loose, so I went for
"Mesamatrix-LinkChecker/1.0 (+https://mesamatrix.net/bot.php)".By defining a context to send to
get_headers()I was able to improve the requests by defining theHEADmethod instead ofGETand reducing the timeout to 5 sec (instead of 60 sec)Also closed a bracket in a string, in
UrlCache.php.