diff --git a/include/config/version.h.in b/include/config/version.h.in index 4dffb5f53..406b42cbb 100644 --- a/include/config/version.h.in +++ b/include/config/version.h.in @@ -28,5 +28,6 @@ #define FREERDP_VERSION "${FREERDP_VERSION}" #define FREERDP_VERSION_FULL "${FREERDP_VERSION_FULL}" #define FREERDP_GIT_REVISION "${GIT_REVISION}" +#define FREERDP_USER_AGENT "FreeRDP/${FREERDP_VERSION_FULL}" #endif /* FREERDP_VERSION_H */ diff --git a/libfreerdp/core/gateway/arm.c b/libfreerdp/core/gateway/arm.c index e9993d30d..9327bad5d 100644 --- a/libfreerdp/core/gateway/arm.c +++ b/libfreerdp/core/gateway/arm.c @@ -19,6 +19,7 @@ */ #include +#include #include "../settings.h" @@ -871,8 +872,8 @@ static BOOL arm_handle_request(rdpArm* arm, BOOL* retry, DWORD timeout) !http_context_set_cache_control(arm->http, "no-cache") || !http_context_set_pragma(arm->http, "no-cache") || !http_context_set_connection(arm->http, "Keep-Alive") || - !http_context_set_user_agent(arm->http, "FreeRDP/3.0") || - !http_context_set_x_ms_user_agent(arm->http, "FreeRDP/3.0") || + !http_context_set_user_agent(arm->http, FREERDP_USER_AGENT) || + !http_context_set_x_ms_user_agent(arm->http, FREERDP_USER_AGENT) || !http_context_set_host(arm->http, freerdp_settings_get_string(arm->context->settings, FreeRDP_GatewayHostname))) goto arm_error; diff --git a/libfreerdp/core/gateway/wst.c b/libfreerdp/core/gateway/wst.c index f3f93999a..1698bb543 100644 --- a/libfreerdp/core/gateway/wst.c +++ b/libfreerdp/core/gateway/wst.c @@ -18,6 +18,7 @@ */ #include +#include #include @@ -810,8 +811,8 @@ rdpWst* wst_new(rdpContext* context) !http_context_set_cache_control(wst->http, "no-cache") || !http_context_set_pragma(wst->http, "no-cache") || !http_context_set_connection(wst->http, "Keep-Alive") || - !http_context_set_user_agent(wst->http, "FreeRDP/3.0") || - !http_context_set_x_ms_user_agent(wst->http, "FreeRDP/3.0") || + !http_context_set_user_agent(wst->http, FREERDP_USER_AGENT) || + !http_context_set_x_ms_user_agent(wst->http, FREERDP_USER_AGENT) || !http_context_set_host(wst->http, wst->gwhostname) || !http_context_enable_websocket_upgrade(wst->http, TRUE)) {