Apache2 and CGI - how to keep Apache from buffering POST data?

I am trying to provide a live analysis of the file upload in CGI and show the data on the screen when it is downloaded.

However, Apache2 seems to want to wait for the full POST to complete before sending the CGI application at all.

How to make Apache2 stop POST buffering in my CGI application?

EDIT

It appears that this is actually the output of the CGI that is being buffered. I began to transfer data to a temporary file in order to monitor its progress. This, and I have another problem.

1) The output is buffered. I tried SetEnvIf (and just SetEnv) for "! Nogzip", "nogzip" and "! Gzip" without success (in the CGI Directory definition).

2) Does Apache2 seem to not read CGI output until the CGI process is complete? I notice that my CGI application (redness or not) constantly hangs on the line "fwrite (..., stdout)" around 80K.

EDIT

Ok, Firefox is messing with me. If I send a 150K file, then there is no CGI lock around 80K. If the file is 2G, then there is a lock. So, Firefox does not read the output from the server while it is trying to send the file ... is there any header or alternative content type to change this behavior?

EDIT

Well, I believe that blocking CGI output on large files is not really important. I do not need an echo file! I am debugging a problem caused by debugging tools. :)

I think it works well. Thank!

FINAL NOTE

... , , Apache2 , , Content-Length. , FireFox , , Apache2 . , Apache2 .

+5
3

, , ? , print .

( stdout script, . DEFLATE, text/, , script. , , . , script , AddOutputFilterByType <Directory> s mod_setenvif, !nogzip.)

, (, DEFLATE) CGI, -. .

: httpd conf, . , , IO .

, CGI ( ) "fwrite (..., stdout)" 80K.

... , , . , , , , , , .

? , -info POST , . HTML-, , AJAX, , ( , , , ) Flash upload.

+3

( ) Apache HTTP Server:

, script "", , . , Perl, - , $| 1. , , .

STDOUT , ?

0
0

All Articles