sebageek / servefile

serve or receive files from shell via a small HTTP server
38 stars 10 forks source link

Fix PUT uploads #12

Closed pawelchcki closed 3 years ago

pawelchcki commented 3 years ago

PUT uploads appeared to be broken on python 3.9

Added tests to cover PUT uploads. And fixed the documentation snippet to point to curl -T file upload helper

@sebageek Thanks for awesome tool!

BTW My testing showed PUT uploads to be as fast as my SSD allowed, while POST took 8x longer. Probably because of https://bytes.com/topic/python/answers/38188-cgi-fieldstorage-slow

sebageek commented 3 years ago

Nice find and thanks for your contribution! :) I didn't know that using PUT is faster, but curl -T is a really nice shortcut. Do you also want to add a line to the ChangeLog regarding the py3 fix or should I do it after merge in a separate commit?

pawelchcki commented 3 years ago

Thanks @sebageek !

want to add a line to the ChangeLog I'm on a work laptop now, I can do it later in the day, but otherwise feel free to merge and add it separately :)