From 30ed6bcf22bedc9720382351fdf46218cbf02aae Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 8 Sep 2007 01:06:29 +0000 Subject: inputStream_http: signal the server to close after all requests We want the partial content goodies of HTTP/1.1 without requiring persistent connections. Persistent connections across multiple HTTP requests don't really help in the case of MPD, either, because our content is usually big and heavy. Note: this puts MPD at the hands of the server to correctly close() the TCP connection we're using. If we connect to a rogue server that keeps the connection alive even when request not to, we'll spin :( However, encountering such a server is very unlikely... git-svn-id: https://svn.musicpd.org/mpd/trunk@6867 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/inputStream_http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inputStream_http.c b/src/inputStream_http.c index 259680e75..515b76ca6 100644 --- a/src/inputStream_http.c +++ b/src/inputStream_http.c @@ -467,7 +467,7 @@ static int finishHTTPInit(InputStream * inStream) length = snprintf(request, sizeof(request), "GET %s HTTP/1.1\r\n" "Host: %s\r\n" - /* "Connection: close\r\n" */ + "Connection: close\r\n" "User-Agent: " PACKAGE_NAME "/" PACKAGE_VERSION "\r\n" "Range: bytes=%ld-\r\n" "%s" /* authorization */ -- cgit v1.2.3