mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-25 15:34:36 +00:00
Include git reference in user agent.
This commit is contained in:
parent
323778e96f
commit
5795bc5766
@ -5,6 +5,7 @@
|
||||
|
||||
#include "../public/common/TracySocket.hpp"
|
||||
#include "../public/common/TracyVersion.hpp"
|
||||
#include "GitRef.hpp"
|
||||
#include "HttpRequest.hpp"
|
||||
|
||||
#if defined _WIN32
|
||||
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user