3 ms·
If Apple coders are reading, I noticed exactly the same issue of User-Agent header not being used on redirects. You can solve this by (ab?)using the CheckRedir
by lifeforms 12y ago
If Apple coders are reading, I noticed exactly the same issue of User-Agent header not being used on redirects.
You can solve this by (ab?)using the CheckRedirect functionality of http.Client to set the User-Agent again.
Here's an example: https://github.com/lifeforms/httpcheck/commit/07440d952d166002ab759873e2885e78e8fa5c61 https://github.com/lifeforms/httpcheck/commit/07440d952d1660... (The program is nothing special, just a little thing I use internally for monitoring)