When dealing with a new file, the initial_etag passed to the Ajax saver is an empty string. Unfortunately, the saver then builds If-Match: "" from this and sends it with the next save request, which is wrong. There should not be any precondition set if initial_etag is empty.
Django 1.10 and earlier used to treat If-Match: "" as if there were no precondition. In other words, the bug in the Ajax saver did not cause any issues when Django 1.10 and earlier was used to respond to the request, and that's why the bug remained undiscovered. Django 1.11 validates If-Match differently and started causing a problem. The issue can be worked around on Django by writing a custom middleware that deletes If-Match if it has the value "".
When dealing with a new file, the
initial_etag
passed to the Ajax saver is an empty string. Unfortunately, the saver then buildsIf-Match: ""
from this and sends it with the next save request, which is wrong. There should not be any precondition set ifinitial_etag
is empty.Django 1.10 and earlier used to treat
If-Match: ""
as if there were no precondition. In other words, the bug in the Ajax saver did not cause any issues when Django 1.10 and earlier was used to respond to the request, and that's why the bug remained undiscovered. Django 1.11 validatesIf-Match
differently and started causing a problem. The issue can be worked around on Django by writing a custom middleware that deletesIf-Match
if it has the value""
.The plan is to have this fixed in version 0.30.