Hi,
This is a patch that implements a hooking mechanism into the
rfc1867_post_handler() function that process post content of type
multipart/form-data, for example when uploading files. This will allow
execution of a callback routine while php reads and process the incoming data.
This happens before the actual script is loaded and executed. This will make
possible for an extension to register a callback, that will do something
interesting like an upload-progress-meter for the incoming uploads.
This wishes to be a better approach to do U-P-M than my previous patch, that
was inserting ugly code directly into rfc1867_post_handler() function. This
new implementation provides separation of code, and a standard hooking
mechanism, whatever you need to do.
This patch define a new configuration option 'upload_progress_tracking'
(default off). You will have to turn it ON, in order for U-P-M to work. This
is intended to reduce the number of wasted cpu cycles when this feature is not
needed. You should turn this on only for the directories/files that actually
need and use this.
Security considerations: data received from client is checked for valid
characters and valid length before doing anything else with it.
What can be done with this ? well... this was intended to be a way to do
an upload progress meter, but you can do a lot of other things, even RUN PHP
CODE while data is uploaded. I have a quick&dirt patch available if anyone want
to play with ...
See the attached README file for more technical details.
BTW, patch is against php-4.3.4
--
Best regards,
Doru Petrescu
Senior Software Engineer
Astral Telecom Bucuresti