Enhancement: WebDav: Return 413 instead of 507 if max-upload is exceeded
Dear dCache developers,
I have a small, non-urgent enhancement request:
When using the max-upload session parameter of the omnisession plugin, the dCache WebDav-door answers for files larger than the allowed size with the HTTP Status Code 507 Insufficient Storage and the message Insufficient storage: SER_DISK_FULL. This signals to the user that no files can be uploaded because we do not provide the neccesary space, which would lead to questions on the fitness of our service if we deploy this in production.
I think it would be more appropriate for dCache to answer with the HTTP status code 413 Payload Too Large, optionally with a message containing the set value of max-upload for the session. This makes it clear that uploads are possible in principle and the upload failed due to the user trying to upload a file which did not conform to the established parameters.
Kind regards, Natascha Manger
Just to add, there's a nice example from MDN that describes a use for 413 status code when the user has exceeded their file upload limit. This seems directly applicable to this scenario in dCache.
Returning 507 (SER_DISK_FULL) is also arguable a bug, since dCache would accept additional data if the individual files were smaller.