Add test for POST.  Some fixes for problems it turned up.