httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: APR_INCOMPLETE status
Date Fri, 03 Aug 2001 14:05:43 GMT
From: "Amit Athavale" <amit_athavale@lycos.com>
Sent: Friday, August 03, 2001 2:07 AM


> I was trying to test the PUT functionality of apache 2.0 with web-Folders. But somehow
i was not able to do it. So i 
> debugged the apache code.(I m using Win NT 4).
> 
> What i found is when we put some file, in flow it calls function dav_fs_get_parent_resource
from mod_dav_fs.
> 
> IN this function there is a call to "apr_stat" to find out about parent information.
Actually it should return APR_SUCCESS.
> But in my case it returns APR_INCOMPLETE. Can somebody tell me whats the exact meaning
of APR_INCOMPLETE ??
> 
> Right now i hae changed code such that if return status APR_INCOMPLETE then also continue.
And surprisingly it works!! 

Not suprizing :(  It means that whatever APR_FINFO_stuff we asked for couldn't be
returned completely (and this shouldn't have happened, but the patch to get some
additional info [correctly] just went in recently.)  Which version of httpd-2.0
were you testing?

This problem is twofold.  Not only do we need to accept APR_INCOMPLETE (for example,
Win9x directories, Win32 Network objects, and all OS2 files do not have .device/.inode
information available, and it should _NOT_ be faked, it would mess up DAV, at least.)
We also should be at least _trying_ to rename when we can't tell the .device., and 
only if it fails, then do a copy.

This is a terrific candidate for an apr_file_move() function (and an apr_file_copy()
while we are at it.)  Sure, if we already know the file can't be renamed, then we aught
to force a copy ourself.  But is it worth two stat/lstat calls to predict a failed rename?

I'll look at a patch on Monday or so, unless someone beats me to it.

Bill



Mime
View raw message