Re: apache::request parse() doesn't capture abort error

2003-06-14 Thread Joe Schaefer
Hector Pizarro [EMAIL PROTECTED] writes:

[...]

 If the user closes the popup in the middle of an upload, Apache::Request
 parse() isn't throwing any error, and all the following code in my module
 savesthe file incomplete in the system, which of course is garbage data.
 
 Is this a bug, an incomplete feature, or is my configuration? 

It's probably a bug in c/apache_multipart_buffer.c.  We may not
do error-checking well enough on fill_buffer().

 If parse is supposed to return an error code, which one is that? 206 =
 HTTP_PARTIAL_CONTENT?

No, that's not an error code.  Since the error here seems
to arise from ap_get_client_block, $r-status should probably
be -1.

 Ok, now let's suppose that this error is fixed. 

With a patch, I hope ;-).

 I want to do several uploads fromthe same popup at once, so I have 5
 file boxes in the form. If the user closesthe popup before the process
 ends, i'd like to save only the completed files, how could I check
 which files are correctly uploaded, and which ones are incomplete?

You could just ignore the final upload object, which has no - next
pointer:

  for (my $u = $req-upload; $u  $u-next; $u = $u-next) {
# do something with $u 
  }

-- 
Joe Schaefer



apache::request parse() doesn't capture abort error

2003-06-13 Thread Hector Pizarro
Hello, first this is my configuration, all were installed by hand:

- apache 1.3.27
- libapreq-1.1
- mod_perl 1.27

 the users of this project can upload big files to the website (videos
 mostly). SoI use an html popup where a mod_perl handler receives the data, let's 
suppose
its 100Mb.
If the user closes the popup in the middle of an upload, Apache::Request
parse() isn't throwing any error, and all the following code in my module
savesthe file incomplete in the system, which of course is garbage data.

Is this a bug, an incomplete feature, or is my configuration? If parse is
supposed to return an error code, which one is that? 206 =
HTTP_PARTIAL_CONTENT?

Ok, now let's suppose that this error is fixed. I want to do several
uploads fromthe same popup at once, so I have 5 file boxes in the form. If the user
closesthe popup before the process ends, i'd like to save only the completed files,
how could I check which files are correctly uploaded, and which ones are
incomplete?

Any help would be great people, thanks.

--
Hector Pizarro
Amautatech