Ticket #2500: httprequest.cpp.diff2

File httprequest.cpp.diff2, 1.1 KB (added by troycauble@…, 18 years ago)

patch

Line 
1--- httprequest.cpp.orig        2006-09-29 23:14:45.000000000 -0400
2+++ httprequest.cpp     2006-09-29 23:14:38.000000000 -0400
3@@ -232,12 +232,18 @@
4         {
5             if ( bRange = ParseRange( sRange, llSize, &llStart, &llEnd ) )
6             {
7-                // sContentType="video/x-msvideo";
8-                m_nResponseStatus = 206;
9-                m_mapRespHeaders[ "Content-Range" ] = QString("%1-%2/%3")
10+                // The Content-Range header is apparently a problem for the
11+                // AVeL LinkPlayer2 and probably other hardware players with
12+                // Syabas firmware.
13+
14+                if (strstr(GetHeaderValue( "User-Agent", ""), "Syabas") == 0)
15+                {
16+                    m_nResponseStatus = 206;
17+                    m_mapRespHeaders[ "Content-Range" ] = QString("%1-%2/%3")
18                                                               .arg( llStart )
19                                                               .arg( llEnd   )
20                                                               .arg( llSize  );
21+                }
22                 llSize = (llEnd - llStart) + 1;
23             }
24         }