Skip to content

Commit

Permalink
Include git reference in user agent.
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfpld committed Sep 9, 2024
1 parent 323778e commit 5795bc5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion profiler/src/HttpRequest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include "../public/common/TracySocket.hpp"
#include "../public/common/TracyVersion.hpp"
#include "GitRef.hpp"
#include "HttpRequest.hpp"

#if defined _WIN32
Expand Down Expand Up @@ -88,7 +89,7 @@ void HttpRequest( const char* server, const char* resource, int port, const std:
tracy::Socket sock;
if( !sock.ConnectBlocking( server, port ) ) return;
char request[4096];
const auto len = sprintf( request, "GET %s HTTP/1.1\r\nHost: %s\r\nUser-Agent: Tracy Profiler %i.%i.%i (%s)\r\nConnection: close\r\nCache-Control: no-cache, no-store, must-revalidate\r\n\r\n", resource, server, tracy::Version::Major, tracy::Version::Minor, tracy::Version::Patch, GetOsInfo() );
const auto len = sprintf( request, "GET %s HTTP/1.1\r\nHost: %s\r\nUser-Agent: Tracy Profiler %i.%i.%i (%s) [%s]\r\nConnection: close\r\nCache-Control: no-cache, no-store, must-revalidate\r\n\r\n", resource, server, tracy::Version::Major, tracy::Version::Minor, tracy::Version::Patch, GetOsInfo(), tracy::GitRef );
sock.Send( request, len );
char response[4096];
const auto sz = sock.ReadUpTo( response, 4096 );
Expand Down

0 comments on commit 5795bc5

Please sign in to comment.