Skip to content

Commit

Permalink
Revert "make searching for headers case insensitive"
Browse files Browse the repository at this point in the history
This reverts commit 5aab168.
  • Loading branch information
uclaros authored and nyalldawson committed Sep 22, 2022
1 parent 69bbf68 commit 1cbc8d8
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/core/pointcloud/qgslazinfo.cpp
Expand Up @@ -355,17 +355,7 @@ bool QgsLazInfo::supportsRangeQueries( QUrl &url )
QgsBlockingNetworkRequest req;
QgsBlockingNetworkRequest::ErrorCode errCode = req.head( nr );
QgsNetworkReplyContent reply = req.reply();
const QList<QgsNetworkReplyContent::RawHeaderPair> pairs = reply.rawHeaderPairs();
bool acceptsRanges = false;
for ( const auto &pair : pairs )
{
if ( QString::fromLocal8Bit( pair.first ).compare( QStringLiteral( "Accept-Ranges" ), Qt::CaseInsensitive ) == 0 &&
QString::fromLocal8Bit( pair.second ).compare( QStringLiteral( "bytes" ), Qt::CaseInsensitive ) == 0 )
{
acceptsRanges = true;
break;
}
}

return errCode == QgsBlockingNetworkRequest::NoError && acceptsRanges;
QString acceptRangesHeader = reply.rawHeader( QStringLiteral( "Accept-Ranges" ).toLocal8Bit() );
return errCode == QgsBlockingNetworkRequest::NoError && acceptRangesHeader.compare( QStringLiteral( "bytes" ), Qt::CaseSensitivity::CaseInsensitive ) == 0;
}

0 comments on commit 1cbc8d8

Please sign in to comment.