[FIX] websrv_lib: Darwin webdav workaround

bzr revid: odo@openerp.com-20101124173028-iumdj77clfhsnsuj
This commit is contained in:
Olivier Dony 2010-11-24 18:30:28 +01:00
parent 475667d384
commit 7505e7d822
1 changed files with 2 additions and 0 deletions

View File

@ -265,6 +265,8 @@ class MultiHTTPHandler(FixSendError, HttpOptions, BaseHTTPRequestHandler):
try:
self.sec_realms[auth_provider.realm].checkRequest(fore,path)
except AuthRequiredExc,ae:
# Darwin 9.x.x webdav clients will report "HTTP/1.0" to us, while they support (and need) the
# authorisation features of HTTP/1.1
if self.request_version != 'HTTP/1.1' and ('Darwin/9.' not in fore.headers.get('User-Agent', '')):
self.log_error("Cannot require auth at %s", self.request_version)
self.send_error(403)