make PUT and DELETE idempotent