-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Description
Some websites, such as GitHub's API, refuse requests from clients that don't provide a User-Agent header, so SP should pass one.
Not sure how to get a version number or specific app name here, but for example just this satisfies basic requirements:
index 789070a..4450f30 100644
--- a/src/io/http/request.cpp
+++ b/src/io/http/request.cpp
@@ -12,6 +12,7 @@ Request::Request(const string& host, int port, Scheme scheme)
: port(port), scheme(scheme)
{
headers["Host"] = host;
+ headers["User-Agent"] = "SeriousProton/0.0.0";
}
void Request::setHeader(const string& key, const string& value)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels