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