#479: PUT FileUpload may leave stale tempfile behind
--------------------------------------------+-------------------------------
 Reporter:  [EMAIL PROTECTED]  |       Owner:  david                     
     Type:  defect                          |      Status:  new                 
      
 Priority:  low                             |   Milestone:  0.11                
      
Component:  request                         |     Version:  HEAD                
      
 Severity:  normal                          |    Keywords:  tempfile stale 
put-request
--------------------------------------------+-------------------------------
 the webrequest writes put fileuploads to temporary file created with
 fopen(tempnam()). If the application decides not to handle the file, it
 will be left behind. Using tmpfile() is out of question, as it would
 remove the file once fclose() is called on the file handle, and leaving
 the file handle open is not really nice.

 a solution would be to add a destructor to AgaviUploadedFile() that checks
 wether the actual referenced file still exitsts and removes it if so.
 However, this would require that no instance or clone of the
 AgaviUploadedFile gets destroyed before the request shuts down or
 implementing a __clone() method that copies the tempfile, to that each
 clone references its own tempfile.

-- 
Ticket URL: <http://trac.agavi.org/ticket/479>
Agavi <http://www.agavi.org/>
An MVC Framework for PHP5


_______________________________________________
Agavi Tickets Mailing List
[email protected]
http://lists.agavi.org/mailman/listinfo/tickets

Reply via email to