1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

Remove leading space in curl_version_info ss_version field.

This commit is contained in:
Patrick Monnerat 2007-08-24 09:06:17 +00:00
parent 975fafdc49
commit d994fcf2b1
4 changed files with 15 additions and 9 deletions

View File

@ -691,7 +691,7 @@ void Curl_gtls_session_free(void *ptr)
size_t Curl_gtls_version(char *buffer, size_t size)
{
return snprintf(buffer, size, " GnuTLS/%s", gnutls_check_version(NULL));
return snprintf(buffer, size, "GnuTLS/%s", gnutls_check_version(NULL));
}
#endif /* USE_GNUTLS */

View File

@ -601,6 +601,6 @@ ssize_t Curl_nss_recv(struct connectdata * conn, /* connection data */
size_t Curl_nss_version(char *buffer, size_t size)
{
return snprintf(buffer, size, " NSS/%s", NSS_VERSION);
return snprintf(buffer, size, "NSS/%s", NSS_VERSION);
}
#endif /* USE_NSS */

View File

@ -1898,7 +1898,7 @@ size_t Curl_ossl_version(char *buffer, size_t size)
#ifdef YASSL_VERSION
/* yassl provides an OpenSSL API compatiblity layer so it looks identical
to OpenSSL in all other aspects */
return snprintf(buffer, size, " yassl/%s", YASSL_VERSION);
return snprintf(buffer, size, "yassl/%s", YASSL_VERSION);
#else /* YASSL_VERSION */
#if (SSLEAY_VERSION_NUMBER >= 0x905000)
@ -1919,7 +1919,7 @@ size_t Curl_ossl_version(char *buffer, size_t size)
sub[0]='\0';
}
return snprintf(buffer, size, " OpenSSL/%lx.%lx.%lx%s",
return snprintf(buffer, size, "OpenSSL/%lx.%lx.%lx%s",
(ssleay_value>>28)&0xf,
(ssleay_value>>20)&0xff,
(ssleay_value>>12)&0xff,
@ -1929,7 +1929,7 @@ size_t Curl_ossl_version(char *buffer, size_t size)
#else /* SSLEAY_VERSION_NUMBER is less than 0.9.5 */
#if (SSLEAY_VERSION_NUMBER >= 0x900000)
return snprintf(buffer, size, " OpenSSL/%lx.%lx.%lx",
return snprintf(buffer, size, "OpenSSL/%lx.%lx.%lx",
(SSLEAY_VERSION_NUMBER>>28)&0xff,
(SSLEAY_VERSION_NUMBER>>20)&0xff,
(SSLEAY_VERSION_NUMBER>>12)&0xf);
@ -1944,7 +1944,7 @@ size_t Curl_ossl_version(char *buffer, size_t size)
else
sub[0]='\0';
return snprintf(buffer, size, " SSL/%x.%x.%x%s",
return snprintf(buffer, size, "SSL/%x.%x.%x%s",
(SSLEAY_VERSION_NUMBER>>12)&0xff,
(SSLEAY_VERSION_NUMBER>>8)&0xf,
(SSLEAY_VERSION_NUMBER>>4)&0xf, sub);

View File

@ -61,9 +61,15 @@ char *curl_version(void)
left -= len;
ptr += len;
len = Curl_ssl_version(ptr, left);
left -= len;
if (left > 1) {
len = Curl_ssl_version(ptr + 1, left - 1);
if (len > 0) {
*ptr = ' ';
left -= ++len;
ptr += len;
}
}
#ifdef HAVE_LIBZ
len = snprintf(ptr, left, " zlib/%s", zlibVersion());