Nagios plugin webdav check 2
Thanks for incorporating the various suggestions and posting a new code review.  This is looking really excellent.  Some nits and answers to your concerns:


creating a function for curling is good.  "$@" is the right choice as well.  But it would be nice if the stuff within squiggly brackets was indented like:

function _curl {
    curl --fail -u $USERNAME:$PASSWORD "$@"
}

I would stick with deleting the temporary file each time so the test is complete each time.  One scenario that might happen would be for the disk to fill up, and so no WebDAV writes are possible, but your test succeeds because it has the space of the existing file to work with or maybe there's code so it doesn't rewrite the file for performance reasons.  Either way leads to a false negative check which is best avoided.
It would be more thorough and nice to check the return value from the delete as well.  Doing this with a nested case statement could get unwieldy and certainly duplicates a lot of code.  If you can turn the case statement into its own function that could bucket the return values for creates or deletes that might be easier to maintain.  There might be other nagios checks where you want to check the output of curl similarly which would be good to keep in mind when designing this curl return evaluator.
Aren't you linking to the wrong prior question?  nagios plugin webdav check was how I got here.  :)