mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-09-29 05:07:36 +00:00
Merge "Log Last-Modified header in performance logger"
This commit is contained in:
commit
3d346f2886
|
@ -1063,7 +1063,7 @@ $wgResourceModules += array(
|
|||
$wgHooks['EventLoggingRegisterSchemas'][] = function( array &$schemas ) {
|
||||
$schemas += array(
|
||||
'MediaViewer' => 10606177,
|
||||
'MultimediaViewerNetworkPerformance' => 10596581,
|
||||
'MultimediaViewerNetworkPerformance' => 10774577,
|
||||
'MultimediaViewerDuration' => 10427980,
|
||||
'MultimediaViewerAttribution' => 9758179,
|
||||
'MultimediaViewerDimensions' => 10014238,
|
||||
|
|
|
@ -185,7 +185,8 @@
|
|||
contentLength,
|
||||
xcache,
|
||||
xvarnish,
|
||||
varnishXCache;
|
||||
varnishXCache,
|
||||
lastModified;
|
||||
|
||||
if ( !request ) {
|
||||
return;
|
||||
|
@ -223,6 +224,11 @@
|
|||
}
|
||||
|
||||
stats.timestamp = new Date( request.getResponseHeader( 'Date' ) ).getTime() / 1000;
|
||||
|
||||
lastModified = request.getResponseHeader( 'Last-Modified' );
|
||||
if ( lastModified ) {
|
||||
stats.lastModified = new Date( lastModified ).getTime() / 1000;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue