Closed Bug 692695 Opened 13 years ago Closed 13 years ago

Sync 1.1 API violation: DELETE .../storage returns "true", should return timestamp

Categories

(Cloud Services Graveyard :: Server: Sync, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: philikon, Assigned: telliott)

Details

(Whiteboard: [good first bug][qa+])

Attachments

(1 file)

Quoting http://docs.services.mozilla.com/storage/apis-1.1.html:
>
>  DELETE https://server/pathname/version/username/storage
>
>    Deletes all records for the user. Will return a precondition error unless
>    an X-Confirm-Delete header is included.
>
>    All delete requests return the timestamp of the action.

But:

  Components.utils.import("resource://services-sync/main.js");
  var resource = new Weave.Resource(Weave.Service.storageURL);
  resource.setHeader("X-Confirm-Delete", "1");
  var response = resource.delete();
  response.toString();

returns "true", as is evident from the server-storage code:

    def delete_storage(self, request):
        ...
        return json_response(True)
Whiteboard: [good first bug]
Can confirm. PHP code returned server timestamp, so it's a porting error.
Assignee: nobody → tarek
Assignee: tarek → telliott
Attachment #566073 - Flags: review?(tarek)
Comment on attachment 566073 [details] [diff] [review]
Returns the timestamp on a delete call rather than true

Looks good - there's an extra empty parasite line in the patch
Attachment #566073 - Flags: review?(tarek) → review+
Fixed in http://hg.mozilla.org/services/server-storage/rev/6b56d4d227b0
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [good first bug] → [good first bug][qa+]
Product: Cloud Services → Cloud Services Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: