Closed Stinkfist0 closed 11 years ago
Qt HTTP client seems to provide this, https://www.developer.nokia.com/Community/Wiki/Network_caching_in_Qt
[...] // Get and display the last modified header QVariant lmod = reply->header( QNetworkRequest::LastModifiedHeader ); if ( lmod.isValid() ) { QDateTime lmodDate = lmod.toDateTime(); QString lmodStr = lmodDate.toString( "dd.MM.yyyy" ); QMessageBox::information( this, "Last Modified", lmodStr, "ok" ); [....]
Oh, that's a nice find @erno! Seems that it does indeed return a QDateTime directly in the QVariant http://qt-project.org/doc/qt-4.8/qnetworkrequest.html#KnownHeaders-enum
HttpAssetProvider::ParseHttpDate contains unsafe code (sscanf) that can crash on malformed input when Tundra is built without Boost. Make the code safe by using regex validation for the input and remove the Boost code path entirely.