From: Brion Vibber Date: Wed, 21 Feb 2007 09:39:33 +0000 (+0000) Subject: * (bug 9044) Send a comment with action=raw pages in CSS/JS output mode X-Git-Tag: 1.31.0-rc.0~53993 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=1ef7033d4c830657f2eeffdcea02e55abde65f62;p=lhc%2Fweb%2Fwiklou.git * (bug 9044) Send a comment with action=raw pages in CSS/JS output mode to work around IE/Mac bug where empty pages time out verrrrryyyyy slowly, particularly with new keepalive-friendly HTTP on Wikipedia --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 4dd78556ef..24399bace7 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -217,6 +217,9 @@ lighter making things easier to read. on a previously fixed attack vector was discovered by Moshe BA from BugSec: http://www.bugsec.com/articles.php?Security=24 * Trackback responses now specify XML content type +* (bug 9044) Send a comment with action=raw pages in CSS/JS output mode + to work around IE/Mac bug where empty pages time out verrrrryyyyy slowly, + particularly with new keepalive-friendly HTTP on Wikipedia == Languages updated == diff --git a/includes/RawPage.php b/includes/RawPage.php index 08130181ca..2b2a5ce4f8 100644 --- a/includes/RawPage.php +++ b/includes/RawPage.php @@ -191,6 +191,20 @@ class RawPage { header( "HTTP/1.0 404 Not Found" ); } + // Special-case for empty CSS/JS + // + // Internet Explorer for Mac handles empty files badly; + // particularly so when keep-alive is active. It can lead + // to long timeouts as it seems to sit there waiting for + // more data that never comes. + // + // Give it a comment... + if( strlen( $text ) == 0 && + ($this->mContentType == 'text/css' || + $this->mContentType == 'text/javascript' ) ) { + return "/* Empty */"; + } + return $this->parseArticleText( $text ); }