Index: trunk/phase3/includes/Feed.php |
— | — | @@ -239,12 +239,15 @@ |
240 | 240 | * but can also be called separately. |
241 | 241 | */ |
242 | 242 | public function httpHeaders() { |
243 | | - global $wgOut; |
| 243 | + global $wgOut, $wgVaryOnXFPForAPI; |
244 | 244 | |
245 | 245 | # We take over from $wgOut, excepting its cache header info |
246 | 246 | $wgOut->disable(); |
247 | 247 | $mimetype = $this->contentType(); |
248 | 248 | header( "Content-type: $mimetype; charset=UTF-8" ); |
| 249 | + if ( $wgVaryOnXFPForAPI ) { |
| 250 | + $wgOut->addVaryHeader( 'X-Forwarded-Proto' ); |
| 251 | + } |
249 | 252 | $wgOut->sendCacheControl(); |
250 | 253 | |
251 | 254 | } |
— | — | @@ -273,7 +276,7 @@ |
274 | 277 | $this->httpHeaders(); |
275 | 278 | echo '<?xml version="1.0"?>' . "\n"; |
276 | 279 | echo '<?xml-stylesheet type="text/css" href="' . |
277 | | - htmlspecialchars( wfExpandUrl( "$wgStylePath/common/feed.css?$wgStyleVersion" ) ) . |
| 280 | + htmlspecialchars( wfExpandUrl( "$wgStylePath/common/feed.css?$wgStyleVersion", PROTO_CURRENT ) ) . |
278 | 281 | '"?' . ">\n"; |
279 | 282 | } |
280 | 283 | } |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -1753,9 +1753,9 @@ |
1754 | 1754 | $wgUseXVO = false; |
1755 | 1755 | |
1756 | 1756 | /** Add X-Forwarded-Proto to the Vary and X-Vary-Options headers for API |
1757 | | - * requests. Use this if you have an SSL termination setup and want to split |
1758 | | - * the cache between HTTP and HTTPS for API requests. This does not affect |
1759 | | - * 'regular' requests. |
| 1757 | + * requests and RSS/Atom feeds. Use this if you have an SSL termination setup |
| 1758 | + * and need to split the cache between HTTP and HTTPS for API and feed requests |
| 1759 | + * in order to prevent cache pollution. This does not affect 'normal' requests. |
1760 | 1760 | */ |
1761 | 1761 | $wgVaryOnXFPForAPI = false; |
1762 | 1762 | |