@@ -728,8 +728,8 @@ QImage *QgsWmsProvider::draw( QgsRectangle const &viewExtent, int pixelWidth, i
728
728
729
729
int col0 = qBound ( minTileCol, ( int ) floor (( viewExtent.xMinimum () - tm->topLeft .x () ) / twMap ), maxTileCol );
730
730
int row0 = qBound ( minTileRow, ( int ) floor (( tm->topLeft .y () - viewExtent.yMaximum () ) / thMap ), maxTileRow );
731
- int col1 = qBound ( minTileCol, ( int ) ceil (( viewExtent.xMaximum () - tm->topLeft .x () ) / twMap ), maxTileCol );
732
- int row1 = qBound ( minTileRow, ( int ) ceil (( tm->topLeft .y () - viewExtent.yMinimum () ) / thMap ), maxTileRow );
731
+ int col1 = qBound ( minTileCol, ( int ) floor (( viewExtent.xMaximum () - tm->topLeft .x () ) / twMap ), maxTileCol );
732
+ int row1 = qBound ( minTileRow, ( int ) floor (( tm->topLeft .y () - viewExtent.yMinimum () ) / thMap ), maxTileRow );
733
733
734
734
#if QGISDEBUG
735
735
int n = ( col1 - col0 + 1 ) * ( row1 - row0 + 1 );
@@ -965,6 +965,19 @@ void QgsWmsProvider::tileReplyFinished()
965
965
.arg ( QString::fromUtf8 ( pair.second ) ), 3 );
966
966
}
967
967
#endif
968
+
969
+ QNetworkCacheMetaData cmd = QgsNetworkAccessManager::instance ()->cache ()->metaData ( reply->request ().url () );
970
+
971
+ QNetworkCacheMetaData::RawHeaderList hl;
972
+ foreach ( const QNetworkCacheMetaData::RawHeader &h, cmd.rawHeaders () )
973
+ {
974
+ if ( h.first != " Cache-Control" )
975
+ hl.append ( h );
976
+ }
977
+ cmd.setRawHeaders ( hl );
978
+
979
+ QgsNetworkAccessManager::instance ()->cache ()->updateMetaData ( cmd );
980
+
968
981
int tileReqNo = reply->request ().attribute ( static_cast <QNetworkRequest::Attribute>( QNetworkRequest::User + 0 ) ).toInt ();
969
982
int tileNo = reply->request ().attribute ( static_cast <QNetworkRequest::Attribute>( QNetworkRequest::User + 1 ) ).toInt ();
970
983
QRectF r = reply->request ().attribute ( static_cast <QNetworkRequest::Attribute>( QNetworkRequest::User + 2 ) ).toRectF ();
@@ -1093,7 +1106,7 @@ void QgsWmsProvider::tileReplyFinished()
1093
1106
}
1094
1107
else
1095
1108
{
1096
- QgsMessageLog::logMessage ( tr ( " Reply to earlier tile request received too late [%1]" ).arg ( reply->url ().toString () ), tr ( " WMS " ) );
1109
+ QgsDebugMsg ( QString ( " Reply too late [%1]" ).arg ( reply->url ().toString () ) );
1097
1110
}
1098
1111
1099
1112
mTileReplies .removeOne ( reply );
0 commit comments