1
0
mirror of https://github.com/moparisthebest/curl synced 2025-01-08 12:28:06 -05:00

my_useragent: shorten user-agent

The built-in user-agent will now only say curl/[version] and nothing
else in an attempt to decrease overhead in HTTP requests.
This commit is contained in:
Daniel Stenberg 2012-05-12 15:07:07 +02:00
parent 3ebcfdda36
commit e7257dcf2e

View File

@ -39,12 +39,7 @@
*/ */
char *my_useragent(void) char *my_useragent(void)
{ {
char useragent[256]; /* we don't want a larger default user agent */ return strdup( CURL_NAME "/" CURL_VERSION );
snprintf(useragent, sizeof(useragent),
CURL_NAME "/" CURL_VERSION " (" OS ") " "%s", curl_version());
return strdup(useragent);
} }
/* /*