Closed
Bug 693864
Opened 13 years ago
Closed 13 years ago
Implement /storage DELETE handling in test JS Sync server
Categories
(Firefox :: Sync, defect)
Firefox
Sync
Tracking
()
RESOLVED
FIXED
mozilla10
People
(Reporter: rnewman, Assigned: rnewman)
Details
(Whiteboard: [fixed in services][qa-])
Attachments
(1 file)
9.28 KB,
patch
|
philikon
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•13 years ago
|
||
One TODO, which is to define the behavior when you submit a non-DELETE request to /storage. I contend that the response should be a 405, and I have included a test for this.
Attachment #566451 -
Flags: review?(philipp)
Comment 2•13 years ago
|
||
Comment on attachment 566451 [details] [diff] [review] Proposed patch. v1 > toplevelHandlers: { > "storage": function handleStorage(handler, req, resp, version, username, rest) { >+ let respond = this.respond.bind(this, req, resp); >+ if (!rest || !rest.length) { >+ this._log.debug("SyncServer: top-level storage " + >+ req.method + " request."); >+ >+ // TODO: verify if this is spec-compliant. >+ if (req.method != "DELETE") { >+ respond(405, "Method Not Allowed", "[]", {"Allow": "DELETE"}); >+ return; >+ } Spec is vague about this, but I bet the server does a 404. I do agree that 405 would be better. Follow up with a spec clarification bug? > s.start(8080, function () { > retrieveWBONotExists( >- retrieveWBOExists.bind(this, function () { >- s.stop(run_next_test); >- }) >- ); >+ retrieveWBOExists.bind(this, >+ getStorageFails.bind(this, >+ deleteStorage.bind(this, function () { >+ s.stop(run_next_test); >+ })))); > }); Callback-tastic.
Attachment #566451 -
Flags: review?(philipp) → review+
Assignee | ||
Comment 3•13 years ago
|
||
See Bug 694129 for the 405 issue.
Comment 4•13 years ago
|
||
https://hg.mozilla.org/services/services-central/rev/2c9b36620889
Whiteboard: [fixed in services][qa-]
Assignee | ||
Comment 5•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/2c9b36620889
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
Updated•6 years ago
|
Component: Firefox Sync: Backend → Sync
Product: Cloud Services → Firefox
You need to log in
before you can comment on or make changes to this bug.
Description
•