websrv_lib: add quirk for Darwin 9.x.x webdav clients.

They will report "HTTP/1.0" to us, while they support (and need) the
authorisation features of HTTP/1.1 .

This makes WebDAV work for some Mac OSX versions.

bzr revid: p_christ@hol.gr-20101123154448-0z7s5o77256cj1tu
This commit is contained in:
P. Christeas
2010-11-23 17:44:48 +02:00
parent c2c264467f
commit a2ee48478a
+2 -2
View File
@@ -266,8 +266,8 @@ class MultiHTTPHandler(FixSendError, HttpOptions, BaseHTTPRequestHandler):
try:
self.sec_realms[auth_provider.realm].checkRequest(fore,path)
except AuthRequiredExc,ae:
if self.request_version != 'HTTP/1.1':
self.log_error("Cannot require auth at %s",self.request_version)
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)
return
self._get_ignore_body(fore) # consume any body that came, not loose sync with input