Anomie has uploaded a new change for review.
https://gerrit.wikimedia.org/r/177232
Change subject: Correct Content-Length from robots.php
......................................................................
Correct Content-Length from robots.php
The current calculation wasn't taking into account the line of dashes
output even when $text is empty.
Change-Id: Ia66cd1daf69209439cd7cd87368a85eaacda3e9a
---
M w/robots.php
1 file changed, 4 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config
refs/changes/32/177232/1
diff --git a/w/robots.php b/w/robots.php
index 18fd51d..0e66c4c 100644
--- a/w/robots.php
+++ b/w/robots.php
@@ -34,8 +34,9 @@
$lastmod = gmdate( 'D, j M Y H:i:s', $stats['mtime'] ) . ' GMT';
header( "Last-modified: $lastmod" );
- header( "Content-Length: " . filesize( $robotsfile ) );
}
-fpassthru( $robots );
+$text =
"#\n#\n#----------------------------------------------------------#\n#\n#\n#\n"
. $text;
+header( "Content-Length: " . ( filesize( $robotsfile ) + strlen( $text ) ) );
-echo
"#\n#\n#----------------------------------------------------------#\n#\n#\n#\n"
. $text;
+fpassthru( $robots );
+echo $text;
--
To view, visit https://gerrit.wikimedia.org/r/177232
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia66cd1daf69209439cd7cd87368a85eaacda3e9a
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits