Fix "req is not defined" error message (which indicates a WebDAV error)