httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <>
Subject Re: [apreq-2] $upload->tempname on Win32
Date Sat, 03 Jul 2004 19:32:49 GMT
Randy Kobes <> writes:

> The current cvs implementation of $upload->tempname on Win32
> in the perl glue fails because, for some reason, although
> the temp file gets created and populated OK in the
> appropriate temp directory, it gets deleted prematurely. For
> example, in src/apreq.c, if I remove the APR_DELONCLOSE flag
> in the apr_file_mktemp() call in the apreq_file_mktemp()
> sub, then the tempname tests in glue/perl/t/apreq/request.t
> pass (save for a \r\n line-ending tweak). 

apr_file_mktemp might DTRT if we pass it a flags = 0 argument in
apreq_file_mktemp.  That seems to work on linux, but I'm concerned
about the APR_BINARY option on Win32.

> I couldn't see though within apreq-2 at what point the deletion
> occurs; 

It may be removing the tempfile immediately after opening it,
but I can't track down exactly where apr_file_mktemp is actually
implemented for Win32.  Do you know which file in apr I should 
be looking at?

> apreq_xs_upload_tempname within Apache__Upload.h seems to run to
> completion successfully.

Not surprising- it's just pulling out the name used when
the tempfile was created.

Joe Schaefer

View raw message