> Tim Pushor wrote:
> 
> list,
> 
> I have an application where I would like to time how long it takes to upload a file 
>via HTTP. What I was wondering is where (when) exactly is the
> file upload taking place? When using tempfiles, when does apache-asp (or CGI.pm) 
>actually transfer the file from the user? I would like to be able
> to execute some code before it happens - mostly to just record the before-transfer 
>time for comparison later.
> 
> Is this possible?
> 

File uploads are processed with CGI.pm during Apache::ASP initialization
while creating the $Request object.  So you need to mark the time before
this object is created, and you can only do this before ASP starts to 
run, or outside of the Apache::ASP init process.

To do this, one might ( or define better as a 
module if this syntax does not work ) :

  PerlInitHandler "sub { Apache->request->pnotes('InitTime', time()) }"

Then later on, say in Script_OnStart, you can reference 
Apache->request->pnotes('InitTime') for a time difference.

--Josh 

_________________________________________________________________
Joshua Chamas                           Chamas Enterprises Inc.
NodeWorks Founder                       Huntington Beach, CA  USA 
http://www.nodeworks.com                1-714-625-4051

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

Reply via email to