source: trunk/website/scripts/updates/index.php @ 2304

Revision 2304, 494 bytes checked in by lowjoel, 3 years ago (diff)

Apache would send responses in chunks if we don't calculate our own response length. This causes 6.0.8 and earlier to choke, so buffer our output and tell the client how long our response is.

Line 
1<?php
2require_once('../UpdateList.php');
3
4$action = $_GET['action'];
5$version = $_GET['version'];
6$versionMatch = array();
7if (empty($action) || empty($version) || !preg_match('/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/', $version, $versionMatch))
8    exit;
9
10ob_start();
11header('content-type: application/xml');
12$downloadsList = intval($versionMatch[2]) == 0 ? new UpdateList1() : new UpdateList1_1();
13$downloadsList->Output($version);
14
15header('content-length: ' . ob_get_length());
16?>
Note: See TracBrowser for help on using the repository browser.