Correct regression in r1804604 that broke WebDAV. This is part of the fix for CVE-2017-12615 This is the fix for CVE-2017-12616