Bug #426

Webdav support broken: HREF can include the full hostname

Added by Ant Lp over 9 years ago. Updated over 9 years ago.

Status:FixedStart date:04/10/2011
Priority:NormalDue date:
Assignee:Andreas Smas% Done:

0%

Category:-
Target version:-
Found in version: Platform:

Description

Hi!

There is a bug in WEBDAV support, it gets triggered if using lighthttp instead of Apache: I get "WEBDAV: File not found in XML reply" when I try to add the bookmark.

I took a look at parse_propfind in fa_http.c, and it looks like this happens because of the condition " if(!strcmp(rpath, fname))".

After some investigation, I found that this condition fails because LightHttp will send the full path in the href as follow:

<D:response>
<D:href>http://192.168.0.111/&lt;/D:href>
<D:propstat>
<D:prop>

But Apache does not:

<D:multistatus xmlns:D="DAV:">
<D:response xmlns:lp1="DAV:" xmlns:lp2="http://apache.org/dav/props/">
<D:href>/</D:href>
<D:propstat>
<D:prop>

It looks like this check should be relaxed. I wonder if strstr() would be enough, or do you want something tighter for broken WebDav detection ?

It'd be great if you could fix that one, thanks!

History

#1 Updated by Andreas Smas over 9 years ago

  • Status changed from New to Accepted

#2 Updated by Andreas Smas over 9 years ago

  • Status changed from Accepted to Fixed
  • Assignee set to Andreas Smas

(Hopefully) fixed in 76689e38

Also available in: Atom PDF