Skip to content

feat: add user-agent when testing extension URLs#372

Merged
MightyCreak merged 1 commit into
mainfrom
feat/add-user-agent
Jul 1, 2026
Merged

feat: add user-agent when testing extension URLs#372
MightyCreak merged 1 commit into
mainfrom
feat/add-user-agent

Conversation

@MightyCreak

@MightyCreak MightyCreak commented Jun 30, 2026

Copy link
Copy Markdown
Owner

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 the HEAD method instead of GET and reducing the timeout to 5 sec (instead of 60 sec)

Also closed a bracket in a string, in UrlCache.php.

@MightyCreak
MightyCreak force-pushed the feat/add-user-agent branch 7 times, most recently from f17a9fa to 20a0a3c Compare July 1, 2026 05:32
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
MightyCreak force-pushed the feat/add-user-agent branch from 20a0a3c to 66eadef Compare July 1, 2026 05:38
@MightyCreak
MightyCreak merged commit 9edbd97 into main Jul 1, 2026
1 check passed
@MightyCreak
MightyCreak deleted the feat/add-user-agent branch July 1, 2026 05:39
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.

1 participant