Overview of a PUT operation
There are four basic stages associated with the saving of a document from Amaya to a remote HTTP server
- The user instructs Amaya to save a document to a remote URL. The client then contacts the server at the Internet address and port number specified in the URL and sends an HTTP PUT request. The header of the request specifies a PUT method, while the body of the request contains the actual data to be published.
- The server authorizes the access, maps the URL into a filename and then handles the filename and the body of the request to a PUT script.
- The PUT script creates the filename and writes the body of the request into it. The script ends by giving back the server the result of the operation (succesful or not).
- The server replies with an HTTP message which contains the above result.
If the server does not authorize the user to do a PUT on the URL, it will
skip steps 2 and 3, and will reply with an appropriate error message.