Fix incorrect check for POST.