ProcessWireUpgrade
ProcessWireUpgrade copied to clipboard
Set PHP's user_agent if empty
Set PHP's user_agent to a non-empty value if not set, as github api requests with an empty/missing user-agent header are rejected with status 403 (forbidden). This should fix issue #11.
@BitPoet Hi! Do you think this is still needed? That is, if a GitHub request with an empty/missing user-agent header is rejected? How do I check this? I never got any errors or warnings using this module.
I'm not sure how to check this, as the error has always shown up inconsistently, but it probably should still be dealt with. The GitHub API docs specifically require a value in the User-Agent header.
@BitPoet @matjazpotocnik This module uses WireHttp so the user-agent header should always be present. WireHttp supplies a default one if any outbound http request fails to specify one. Though it looks like this module uses its name (ProcessWireUpgrade) as the user-agent header.