A COPY request such as COPY /xyz HTTP/1.1 Host: www.example.com Destination: http://julian-reschke.de/foo succeeds. It should fail, unless the server has indeed created the resource at the destination URI (which it didn't).
The code that checked the hostname/port has been disabled in 2.x for some reason. dav/util.c: #ifdef APACHE_PORT_HANDLING_IS_BUSTED if (comp.hostname != NULL && !ap_matches_request_vhost(r, comp.hostname, port)) { ...
Julian explains that a potential reason is that being compliant here has problems with reverse proxies: Consider MOVE /a HTTP/1.1 Host: www.example.com Destination: http://www.example.com/b sent to a reverse proxy running on port 80 of www.example.com, which in turn forwards the request to port 8080, rewriting the host header, but not touching the Destination header: MOVE /a HTTP/1.1 Host: www.example.com:8080 Destination: http://www.example.com/b A compliant WebDAV server will detect that the target of MOVE is on a different server, and fail the request.
Personally, I don't think that "fixing" the problem for reverse proxies justifies being non-compliant in this manner, if this is indeed the reason why we disabled the check.
See http://lists.w3.org/Archives/Public/w3c-dist-auth/2006JanMar/0286.html for Julian's expanded summary regarding reverse proxies.
Will it be fixed? Is there any way to do it? If there is a way just tell me, I will try ;)
Created attachment 22612 [details] Proposed patch for this problem This patch check if Destination host/port is the same as Host host/port. If not, BAD GATEWAY is returned. It also translates Destination header in reverse proxy mode.
Did you consider to, while fixing this, also allow the new RFC 4918 format (absolute path instead of absolute URI)?
No, but it would be one simple check for Destination format.
Created attachment 22618 [details] Patch with non-absolute path support
#7 - done
Please help us to refine our list of open and current defects; this is a mass update of old and inactive Bugzilla reports which reflect user error, already resolved defects, and still-existing defects in httpd. As repeatedly announced, the Apache HTTP Server Project has discontinued all development and patch review of the 2.2.x series of releases. The final release 2.2.34 was published in July 2017, and no further evaluation of bug reports or security risks will be considered or published for 2.2.x releases. All reports older than 2.4.x have been updated to status RESOLVED/LATER; no further action is expected unless the report still applies to a current version of httpd. If your report represented a question or confusion about how to use an httpd feature, an unexpected server behavior, problems building or installing httpd, or working with an external component (a third party module, browser etc.) we ask you to start by bringing your question to the User Support and Discussion mailing list, see [https://httpd.apache.org/lists.html#http-users] for details. Include a link to this Bugzilla report for completeness with your question. If your report was clearly a defect in httpd or a feature request, we ask that you retest using a modern httpd release (2.4.33 or later) released in the past year. If it can be reproduced, please reopen this bug and change the Version field above to the httpd version you have reconfirmed with. Your help in identifying defects or enhancements still applicable to the current httpd server software release is greatly appreciated.