You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Amit Athavale <am...@lycos.com> on 2001/08/03 09:07:25 UTC

APR_INCOMPLETE status

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!! 

Thanks
Amit


Get 250 color business cards for FREE!
http://businesscards.lycos.com/vp/fastpath/

Re: APR_INCOMPLETE status

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
From: "Amit Athavale" <am...@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



Re: APR_INCOMPLETE status

Posted by Jeff Trawick <tr...@attglobal.net>.
"Amit Athavale" <am...@lycos.com> writes:

> 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!! 

(meta: the correct mailing list for APR issues like this is
dev@apr.apache.org; please configure your mail client to wrap lines at
72 chars or so)

Unfortunately, there are now two uses of APR_INCOMPLETE:

1) (original use) the final character in a buffer being
   translated/recoded from one character set to another is incomplete

2) not all the information requested about a file could be retrieved

   By far most occurrences of APR_INCOMPLETE in the APR and Apache
   sources are this second use.

-- 
Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...