Commit graph

10 commits

Author SHA1 Message Date
Siebrand Mazeland
79d5225c0e * remove end of line whitespace
* remove empty lines at end of file
* remove "?>" where still present
2008-04-14 07:45:50 +00:00
Tim Starling
377561cd1e * Introduced OutputPage::addWikiMsg() and OutputPage::wrapWikiMsg(), to make it easier to avoid double-parsing. Double-parsing introduces differences between the old and new parsers.
* Used the new functions in the relevant places throughout the core. Where this was not possible, used wfMsgNoTrans() to avoid double-parsing.
* Calling wfEscapeWikiText() on a title before passing it to a message is unnecessary and causes bugs. The best idea is to let the message do its own escaping. Removed wfEscapeWikiText() from the caller of addedwatchtext, removedwatchtext, deletedtext, protect-text, nosuchusershort and movepage-moved. Updated all message files to use <nowiki>$1</nowiki> where appropriate in these messages. 
* Removed unnecessary empty message handling from semiprotectedpagewarning
* Removed nonsense warning about the output of wfMsg() not being safe for inclusion in HTML. 
* Changed wfShellExec() to use passthru/ob_get_contents instead of exec(). This avoids corruption of whitespace in the response. 
* Added $wgValidateAllHtml feature, to optionally validate HTML on output. 
* Fixed missing newline in cascadeprotected in MessagesEn.php
* Belatedly updated addedwatchtext to take account of the new "monobook" skin. No unwatch link in the sidebar anymore.
2008-02-18 07:25:35 +00:00
Tim Starling
55bd3a0279 Add an X-Vary-Options header, as per my proposed squid patch 2008-02-08 07:12:38 +00:00
Brion Vibber
455feda3ac * (bug 11795) Be more paranoid about confirming accept-encoding header is present 2007-10-29 17:41:55 +00:00
Brion Vibber
f4080c1838 Don't do gzip compression if the URL path ends in .gz or .tgz
This confuses Safari and triggers a download of the page,
even though it's pretty clearly labeled as viewable HTML.
Bad Safari! Bad!

Bug is still present in Safari 2.0.4/Mac and 3.0.2/Win.

We have had a live hack for this on Wikimedia sites for .gz files;
hadn't noticed the .tgz problem before though.

While I was in there, also made a tweak so wfGzipHandler() makes
sure the Vary: header is there whether the current agent sent us
an Accept-Encoding header or not.
2007-07-19 19:06:32 +00:00
Aryeh Gregor
a15c419b3d Remove ?>'s from files. They're pointless, and just asking for people to mess with the files and add trailing whitespace. (Yes, I looked over every one and reverted those that were bogus. Slash-enter a million times in less worked well enough, although it was a bit mind-numbing.) 2007-06-29 01:19:14 +00:00
Brion Vibber
0757f0a92e Fix regression: typo caused 'Vary: Accept-Encoding' to be sent overwriting more exact Vary lines such as the Vary: Accept-Encoding, Cookie used for squid mode 2007-02-20 05:04:36 +00:00
Brion Vibber
94e8f63eb7 Don't suppress gzip mode for zero-length output; failing to send the
Content-Encoding header with 304 responses confuses some browsers.
2007-02-20 04:58:54 +00:00
Brion Vibber
62ef8829fb * Further fix to Special:Export etc; instead of trying to suppress those
Content-Encoding and Content-Length headers, just don't send them 
  in the first place!
* Suppress Content-Length from wfOutputHandler if $wgDisableOutputCompression set
* Fix typo that caused $wgDisableOutputCompression to *enable* instead of *disable* compression ;)
2007-02-20 04:46:07 +00:00
Tim Starling
28dc3ec888 * Moved the main ob_start() from the default LocalSettings.php to WebStart.php.
The ob_start() section should preferably be removed from older 
  LocalSettings.php files.
* Give Content-Length header for HTTP/1.0 clients.
* Partial support for Flash cross-domain-policy filtering. Text entry points should be protected, but uploads are not.
2007-02-19 23:03:37 +00:00