|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-03-12 21:45 UTC] xuefer at 21cn dot com
Description:
------------
it works under apache1, but not on apache2
this script is used for network-speed testing
yet, i don't know if it's relative to php or apache
Reproduce code:
---------------
<?php
header("Content-Type: binary");
// while (@ob_clean());
set_time_limit(5); // may be 1
$fp = fopen("/dev/urandom");
$u = fread($fp, 1024 * 1024); // 1mb
while (1) {
echo $u;
ob_flush(); flush();
}
?>
Expected result:
----------------
under apache1, each time request to this file will download start from 0% immediately
tested under IE & Flashget
Actual result:
--------------
but under apache2, 1st time seems ok, cancel IE download or stopped flashget, then try again(with "Rang" header), download will not start until script is timedout, then, start with a content-length in response header
the process of apache2 is taking so much memory about XXmb even 1XXmb
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 04:00:01 2025 UTC |
php apache2handler should remove "BYTERANGE" outputfilter example code is in: ./modules/experimental/cache_util.c line 82 CACHE_DECLARE(void) ap_cache_reset_output_filters(request_rec *r) { ap_filter_t *f = r->output_filters; while (f) { if (!strcasecmp(f->frec->name, "CORE") || !strcasecmp(f->frec->name, "CONTENT_LENGTH") || !strcasecmp(f->frec->name, "HTTP_HEADER")) { f = f->next; continue; } else { ap_remove_output_filter(f); f = f->next; } } }