Skip to content

Commit

Permalink
Backports fix: Removed AVeL LinkPlayer2 (SyaBas) specific exception l…
Browse files Browse the repository at this point in the history
…ogic since real fix for #2500 was to Content-Range header in prior commit

git-svn-id: http://svn.mythtv.org/svn/branches/release-0-20-fixes@14271 7dbf422c-18fa-0310-86e9-fd20926502f2
  • Loading branch information
dblain committed Aug 23, 2007
1 parent 6c5aa01 commit 8a9b535
Showing 1 changed file with 11 additions and 24 deletions.
35 changes: 11 additions & 24 deletions mythtv/libs/libmythupnp/httprequest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,35 +313,22 @@ long HTTPRequest::SendResponseFile( QString sFileName )
m_nResponseStatus = 200;

// ------------------------------------------------------------------
// The Content-Range header is apparently a problem for the
// AVeL LinkPlayer2 and probably other hardware players with
// Syabas firmware.
//
// -=>TODO: Need conformation
// Process any Range Header
// ------------------------------------------------------------------

bool bRange = false;
QString sUserAgent = GetHeaderValue( "User-Agent", "");
bool bRange = false;
QString sRange = GetHeaderValue( "range", "" );

if ( sUserAgent.contains( "Syabas", false ) == 0 )
if (sRange.length() > 0)
{
// --------------------------------------------------------------
// Process any Range Header
// --------------------------------------------------------------

QString sRange = GetHeaderValue( "range", "" );

if (sRange.length() > 0)
if ( bRange = ParseRange( sRange, llSize, &llStart, &llEnd ) )
{
if ( bRange = ParseRange( sRange, llSize, &llStart, &llEnd ) )
{
m_nResponseStatus = 206;
m_mapRespHeaders[ "Content-Range" ] = QString("bytes %1-%2/%3")
.arg( llStart )
.arg( llEnd )
.arg( llSize );
llSize = (llEnd - llStart) + 1;
}
m_nResponseStatus = 206;
m_mapRespHeaders[ "Content-Range" ] = QString("bytes %1-%2/%3")
.arg( llStart )
.arg( llEnd )
.arg( llSize );
llSize = (llEnd - llStart) + 1;
}
}

Expand Down

0 comments on commit 8a9b535

Please sign in to comment.