Commit 0f1dce8f authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

(packet capture) stream/flush output to browser, closes...

(packet capture) stream/flush output to browser, closes https://github.com/opnsense/core/issues/1116

(cherry picked from commit 6e060977)
parent 4252e978
......@@ -154,7 +154,12 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=packetcapture.cap");
header("Content-Length: ".filesize("/root/packetcapture.cap"));
readfile("/root/packetcapture.cap");
$file = fopen("/root/packetcapture.cap", "r");
while(!feof($file)) {
print(fread($file, 32 * 1024));
ob_flush();
}
fclose($file);
exit;
} elseif (!empty($_GET['view'])) {
// download capture contents
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment