Bug 55397

Summary: mod_dav: dav_resource->uri is now being treated as an unparsed uri
Product: Apache httpd-2 Reporter: Ben Reser <ben>
Component: mod_davAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: RESOLVED FIXED    
Severity: normal CC: ivan, stephane.chazelas
Priority: P2 Keywords: FixedInTrunk
Version: 2.5-HEAD   
Target Milestone: ---   
Hardware: PC   
OS: All   

Description Ben Reser 2013-08-10 02:35:52 UTC
Prior to the change that was introduced by PR 54611 the uri member of the dav_resource struct was treated as though it was uri encoded.  mod_dav_fs however, didn't properly encode this.

mod_dav_svn on the other hand did.  By encoding in mod_dav, this now ends up double encoding the URI.  For the most part Subversion no longer uses the Location header to get information from mod_dav as we've shifted to our HTTPv2 protocol that doesn't use have to use PROPFIND to detect resource URIs.  However, older clients talking to newer servers or newer clients talking to older servers still do.  Any server that's been upgraded to httpd 2.2.25 or 2.4.6 that includes this change breaks those clients when dealing with paths that need proper encoding (e.g. paths with spaces).

Essentially the PR54611 was an API change since it changed the meaning of a field.

I plan to revert the P54611 change and fix the problem in mod_dav_fs.  This means that sites with 2.2.25 or 2.4.6 can upgrade httpd without necessarily having to upgrading Subversion.  For some of these sites upgrading Subversion might not be a possible alternative since they may be using the no longer supported 1.6.x line.  In fact due to the protocol versioning issues mentioned above 1.6.x servers are guaranteed to have this issue regardless of the client version users are using.
Comment 1 Ben Reser 2013-10-06 01:09:41 UTC
Fixed on trunk with r1529559.
Comment 2 Ben Reser 2013-10-12 06:14:42 UTC
Needed r1531505 as well, previous commit missed encoding the children of the collection when PROPFIND depth wasn't 0.
Comment 3 Stephane Chazelas 2014-02-26 10:39:34 UTC
I believe that last r1531505 breaks mod_dav_svn from 1.8.8:
https://bugs.launchpad.net/ubuntu/+source/subversion/+bug/1284641
Comment 4 Stephane Chazelas 2014-02-26 10:40:54 UTC
(In reply to Stephane Chazelas from comment #3)
> I believe that last r1531505 breaks mod_dav_svn from 1.8.8:
> https://bugs.launchpad.net/ubuntu/+source/subversion/+bug/1284641

Sorry, meant r1529559 above.
Comment 5 Ben Reser 2014-04-02 20:00:54 UTC
(In reply to Stephane Chazelas from comment #4)
> (In reply to Stephane Chazelas from comment #3)
> > I believe that last r1531505 breaks mod_dav_svn from 1.8.8:
> > https://bugs.launchpad.net/ubuntu/+source/subversion/+bug/1284641
> 
> Sorry, meant r1529559 above.

r1529559 can't do anythign to SVN.  The change there is to mod_dav_fs which has nothing to do with SVN.
Comment 6 Ben Reser 2014-04-02 20:03:42 UTC
Marking this as fixed.  This was included in 2.4.7 and 2.2.26.
Comment 7 Ben Reser 2014-05-01 20:45:19 UTC
Stephane, please see issue #56480 for the problem you're describing.  It's related but I think it's best to handle it with a new issue.