| | 13 | if ($output) { |
|---|
| | 14 | header("Pragma: public"); |
|---|
| | 15 | header("Cache-Control: public"); |
|---|
| | 16 | |
|---|
| | 17 | // no time data on this RSS, at least not without rewriting some function outputs |
|---|
| | 18 | |
|---|
| | 19 | $if_none_match = preg_replace('/[^0-9a-f]/', '', $_SERVER['HTTP_IF_NONE_MATCH']); |
|---|
| | 20 | |
|---|
| | 21 | $etag = md5($output); |
|---|
| | 22 | |
|---|
| | 23 | if ($if_none_match == $etag) { |
|---|
| | 24 | header("{$_SERVER['SERVER_PROTOCOL']} 304 Not Modified"); |
|---|
| | 25 | exit; |
|---|
| | 26 | } |
|---|
| | 27 | |
|---|
| | 28 | header("Content-Length: " . strlen($output)); |
|---|
| | 29 | header('ETag: "' . $etag . '"'); |
|---|
| | 30 | |
|---|
| | 31 | header("Content-type: text/xml"); |
|---|
| | 32 | echo $output; |
|---|
| | 33 | } |
|---|