Use string concatenation instead of snprintf for the User-Agent HTTP

header.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6520 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
J. Alexander Treuman 2007-06-09 13:43:40 +00:00
parent 9980d233c4
commit 9ccf0d8a25

View File

@ -468,14 +468,13 @@ static int finishHTTPInit(InputStream * inStream)
"GET %s HTTP/1.1\r\n"
"Host: %s\r\n"
/* "Connection: close\r\n" */
"User-Agent: %s/%s\r\n"
"User-Agent: " PACKAGE_NAME "/" PACKAGE_VERSION "\r\n"
"Range: bytes=%ld-\r\n"
"%s" /* authorization */
"Icy-Metadata:1\r\n"
"\r\n",
data->path,
data->host,
PACKAGE_NAME, PACKAGE_VERSION,
inStream->offset,
data->proxyAuth ? data->proxyAuth :
(data->httpAuth ? data->httpAuth : ""));