DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20295>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20295

Uploading large multipart/form-data sometimes fails





------- Additional Comments From [EMAIL PROTECTED]  2003-06-04 12:57 -------
The above test program seems to run fine on my system.  I also tried adding 
some delays in the Perl program between reads, which results in an initial 
block on the first write, with the second write attempt always being successful 
once apr_wait_for_io_or_timeout() returns success.  All seems to be working as 
expected.

However, this test only calls apr_file_write_full() just once with a large 
amount of data.  My tests show that in a real system apr_file_write_full() gets 
called a number of times with a much smaller amount of data (approx. 8000 bytes 
per iteration) - ref. cgi_handler() in mod_cgi.c

I modified the test program (writefull.c) as follows:

...
    int size = 8000;
...
        do
        {
            rv = apr_file_write_full(script_out, memory, size, NULL);
            printf("rv from file_write_full: %d\n", rv);
//              sleep(1);
        }
        while (iteration++<10);
...

i.e. set data size to 8000 and call apr_file_write_full() multiple times.
On my system this successfully reproduces the problem:

rv from file_write_full: 0
rv from file_write_full: 11
rv from file_write_full: 11
rv from file_write_full: 11
rv from file_write_full: 11
rv from file_write_full: 11
rv from file_write_full: 11
rv from file_write_full: 11
rv from file_write_full: 11
rv from file_write_full: 11
rv from file_write_full: 11
rv from file_read: 0/52
Content-Type: text/plain

length of data read: 8000

Interestingly, if the data size is increased, say to 1000000 bytes, there seems 
to be no problem???

rv from file_write_full: 0
rv from file_write_full: 0
rv from file_write_full: 0
rv from file_write_full: 0
rv from file_write_full: 0
rv from file_write_full: 0
rv from file_write_full: 0
rv from file_write_full: 0
rv from file_write_full: 0
rv from file_write_full: 0
rv from file_write_full: 0
rv from file_read: 0/56
Content-Type: text/plain

length of data read: 11000000

However, if I reduce the amount of data, say to 2000, the first few writes are 
successful, before subesequent attempts block:

rv from file_write_full: 0
rv from file_write_full: 0
rv from file_write_full: 0
rv from file_write_full: 0
rv from file_write_full: 11
rv from file_write_full: 11
rv from file_write_full: 11
rv from file_write_full: 11
rv from file_write_full: 11
rv from file_write_full: 11
rv from file_write_full: 11
rv from file_read: 0/52
Content-Type: text/plain

length of data read: 8000

If the sleep() call is uncommented in the above loop, the data is written 
successfully in every test case.

I'm hoping you can reproduce this behaviour on your system with the above test 
program modifications.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to