I'm sure someone will find a duplicate sometime later. But for now, here's my question:
I want to handle file uploads in this way:
Before user agent uploads the HTTP body, I want to receive the header first and determine whether the current CDN server is capable of storing the uploaded file.
If it cannot, a 307 redirect response is returned, telling the UA to try the next server in line (cdn0.example.com -> cdn1.example.com -> cdn2.example.com -> cdn3.exmaple.com -> etc...), until a server receives the file body successfully, or in the unlikely case, return a 500 status code.
Obviously, I don't want to store the request body too soon, so the POST method is probably not what I want. So can the PUT method work for me? And how?
Side question: Is "507 Insufficient Storage" a WebDAV-specific status code, or it's a general status code I can use elsewhere?