--- a/upnphttp.c
+++ b/upnphttp.c
@@ -1264,7 +1264,7 @@
 	int try_sendfile = 1;
 #endif
 
-	while( offset < end_offset )
+	while( offset <= end_offset )
 	{
 #if HAVE_SENDFILE
 		if( try_sendfile )