1.1 --- a/actions/SharedUpdate.py Sun Jul 15 21:33:24 2012 +0200
1.2 +++ b/actions/SharedUpdate.py Sun Jul 15 22:10:20 2012 +0200
1.3 @@ -136,12 +136,14 @@
1.4 # Perform content negotiation if no mimetype was specified.
1.5
1.6 if mimetype is None:
1.7 - mimetype = getPreferredOutputTypes(request, mimetypes)[0]
1.8 + mimetypes = getPreferredOutputTypes(request, mimetypes)
1.9 + if mimetypes:
1.10 + mimetype = mimetypes[0]
1.11
1.12 # Where no suitable mimetype is found, break out of the loop and return
1.13 # an error.
1.14
1.15 - elif mimetype not in mimetypes:
1.16 + if not mimetypes or mimetype not in mimetypes:
1.17 status = "406 Not Acceptable"
1.18 break
1.19