support HTTP PUT of new file and fix PUT of existing file
Merge origin/master