Use POST in bulk-delete

Bug #1253948 reported by OpenStack Infra
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-api-site
Fix Released
Medium
Diane Fleming
openstack-manuals
Fix Released
Medium
Diane Fleming

Bug Description

https://review.openstack.org/53090
commit 94090e8760da324d6586b5d45b7c339457e33647
Author: Kun Huang <email address hidden>
Date: Tue Oct 22 18:05:43 2013 +0800

    Use POST in bulk-delete

    The DELETE verb applies to a single resource, and doesn't define any
    semantics for the body.

    http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.7

    The swift Bulk Delete command affects multiple resources specified in a
    DELETE body.

    http://docs.openstack.org/developer/swift/misc.html#module-swift.common.middleware.bulk

    While Bulk Delete is a welcome operation, its usage of DELETE is
    unusual: affecting multiple resources and relying on reading content.

    More typically, such an operation employs POST (or PUT), which folks
    including api-craft usually agree is the best "catch-all" verb for
    behaviors such as those affecting multiple resources. That's the TL;DR;
    of the thread below.

    https://groups.google.com/forum/#!searchin/api-craft/Regarding$20Bulk$20actions/api-craft/wY-W1NdZDRs/7YDwMhCR608J

    Note that this topic isn't nasal or abstract. The current behavior is
    unsupported using the built-in java http client. Even if third-party
    libraries can work around this behavior, it is probably best to not be a
    snowflake wrt http verb semantics where possible!

    http://stackoverflow.com/questions/9100776/http-delete-with-request-body-issues

    DocImpact

    Closes-Bug: #1232787
    Change-Id: I0fc74c85618fe4dd7ff5e7f9756c7f6f67aa0465

Tags: swift
Tom Fifield (fifieldt)
Changed in openstack-manuals:
milestone: none → icehouse
status: New → Confirmed
importance: Undecided → Medium
Tom Fifield (fifieldt)
Changed in openstack-api-site:
status: New → Confirmed
importance: Undecided → Medium
milestone: none → icehouse
Revision history for this message
Diane Fleming (diane-fleming) wrote :

This has already been addressed in the docs: http://docs.openstack.org/api/openstack-object-storage/1.0/content/bulk-delete.html
It's noted that both POST and DELETE work, but DELETE is supported for backward compatibility for bulk-delete.

Changed in openstack-manuals:
assignee: nobody → Diane Fleming (diane-fleming)
Changed in openstack-api-site:
assignee: nobody → Diane Fleming (diane-fleming)
status: Confirmed → Fix Committed
Changed in openstack-manuals:
status: Confirmed → Fix Committed
Tom Fifield (fifieldt)
Changed in openstack-api-site:
status: Fix Committed → Fix Released
Changed in openstack-manuals:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.