openresty / echo-nginx-module

An Nginx module for bringing the power of "echo", "sleep", "time" and more to Nginx's config file
http://wiki.nginx.org/NginxHttpEchoModule
BSD 2-Clause "Simplified" License
1.17k stars 254 forks source link

echo: code runs in chrome, but not firefox or safari #75

Closed keinwort closed 7 years ago

keinwort commented 7 years ago

the following code does not run with firefox or safari, but looks fine with google chrome. in chrome every few seconds, as intended, the words are shown. in other browsers you have to wait roughly all the 40 seconds until something is displayed. can't find anything about "not compatible" with the one or other browser, ... do i miss something?

perhaps you wanna try yourself @ h##ps://keinwort.de/404

code: error_page 404 /404; location = /404 { default_type text/plain;

echo_status 404;

        echo "einen wunderschoenen guten tag user bei IP" $remote_addr;
        echo_flush;
        echo_sleep 3.33;
        echo "oh! ooohhh!";
        echo_flush;
        echo_sleep 3.33;
        echo "da ist vielleicht was verschwunden moeglicherweise, koennte sein.";
        echo_flush;
        echo_sleep 3.33;
        echo "nein, da nicht";
        echo_flush;
        echo_sleep 6.66;
        echo "na vielleicht da?";
        echo_flush;
        echo_sleep 6.66;
        echo "ne du, hab ich nicht gefunden.";
        echo_flush;
        echo_sleep 3.33;
        echo "ganz eindeutig ein 404";
        echo_flush;
        echo_sleep 6.66;
        echo "nee, dat wirt niks meer! gibbet nich, aus basta!";
        echo_flush;
        echo_sleep 3.33;
        echo "komm, probier du nochmal.";
        echo_flush;
        echo_sleep 3.33;
        echo "versuchs mal am anfang bei ->" $server_name;
        echo_flush;
        echo_sleep 6.66;
        echo "so ich mach jetzt schluss, punkt aus.";
        echo_flush;
        echo_sleep 3.33;
        echo " ein freundlicher netzdiener";
        echo " buy buy.";
        echo_flush;
        }

compile options: ./configure --add-dynamic-module=/root/dauns/ngx_echo/echo-nginx-module-0.61 --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-g -O2 -fdebug-prefix-map=/data/builder/debuild/nginx-1.13.7/debian/debuild-base/nginx-1.13.7=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC' --with-ld-opt='-specs=/usr/share/dpkg/no-pie-link.specs -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie' checking for OS

agentzh commented 7 years ago

@keinwort It's known that some browsers may choose to buffer data more aggressively before rendering again. I don't think it has anything to do with this module running on the server side. We do not have any control over how aggressively the clients choose to render new data anyway.

keinwort commented 6 years ago

just another useless comment: h##ps://keinwort.de/404 is no more