>From 3d2f622e9a344d21ba5efb4a84159daa1f4e8574 Mon Sep 17 00:00:00 2001
From: Bill C Riemers <docbill@hartnell.local>
Date: Tue, 17 Jun 2008 16:16:22 -0400
Subject: [PATCH] No need to send Connection: close or Connection: Keep-Alive.

---
 modules/access/http.c |   14 +++-----------
 1 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/modules/access/http.c b/modules/access/http.c
index f7a2995..a4bc00e 100644
--- a/modules/access/http.c
+++ b/modules/access/http.c
@@ -1193,17 +1193,6 @@ static int Request( access_t *p_access, int64_t i_tell )
     net_Printf( VLC_OBJECT(p_access), p_sys->fd, pvs, "Icy-MetaData: 1\r\n" );
 
 
-    if( p_sys->b_continuous )
-    {
-        net_Printf( VLC_OBJECT( p_access ), p_sys->fd, pvs,
-                    "Connection: Keep-Alive\r\n" );
-    }
-    else if( p_sys->i_version == 1 )
-    {
-        net_Printf( VLC_OBJECT( p_access ), p_sys->fd, pvs,
-                    "Connection: Close\r\n");
-    }
-
     if( net_Printf( VLC_OBJECT(p_access), p_sys->fd, pvs, "\r\n" ) < 0 )
     {
         msg_Err( p_access, "failed to send request" );
@@ -1456,6 +1445,9 @@ static int Request( access_t *p_access, int64_t i_tell )
 
         free( psz );
     }
+    if(p_sys->i_remaining == 0 && (p_access->info.i_size == -1 || p_access->info.i_size == i_tell)) {
+        Disconnect( p_access );
+    }
     return VLC_SUCCESS;
 
 error:
-- 
1.5.5.1

