diff --git a/CHANGELOG b/CHANGELOG index faa6a45361..c816486cd9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,17 +1,6 @@ v1.5.0 (XXXX-XX-XX) ------------------- -* issue #756: set access-control-expose-headers on CORS response - - the following headers are now whitelisted by ArangoDB in CORS responses: - - etag - - content-encoding - - content-length - - location - - server - - x-arango-errors - - x-arango-async-id - * Several UI improvements. * Exchanged icons in the graphviwer toolbar @@ -172,6 +161,23 @@ v1.4.10 (XXXX-XX-XX) * added loading of .json file +* Fixed http return code in graph api with waitForSync parameter. + +* Fixed documentation in graph, simple and index api. + +* removed 2 tests due to change in ruby library. + +* issue #756: set access-control-expose-headers on CORS response + + the following headers are now whitelisted by ArangoDB in CORS responses: + - etag + - content-encoding + - content-length + - location + - server + - x-arango-errors + - x-arango-async-id + v1.4.9 (2014-02-07) ------------------- diff --git a/UnitTests/HttpInterface/api-http-spec.rb b/UnitTests/HttpInterface/api-http-spec.rb index 7b17363f7b..e5e929c28d 100644 --- a/UnitTests/HttpInterface/api-http-spec.rb +++ b/UnitTests/HttpInterface/api-http-spec.rb @@ -8,28 +8,6 @@ describe ArangoDB do context "dealing with HTTP methods:" do -################################################################################ -## checking invalid body sizes -################################################################################ - - context "invalid sizes of body:" do - it "checks negative content-length" do - cmd = "/_api/version" - doc = ArangoDB.log_post("#{prefix}-content-length", cmd, { :headers => { "Content-Length" => "-1" } }) - - doc.code.should eq(411) - doc.response.body.should eq("") - end - - it "checks too big content-length" do - cmd = "/_api/version" - doc = ArangoDB.log_post("#{prefix}-content-length", cmd, { :headers => { "Content-Length" => "9999999999" } }) - - doc.code.should eq(413) - doc.response.body.should eq("") - end - - end ################################################################################ ## checking HTTP HEAD responses diff --git a/js/actions/api-graph.js b/js/actions/api-graph.js index 9debb2d967..c01b92bdae 100644 --- a/js/actions/api-graph.js +++ b/js/actions/api-graph.js @@ -255,10 +255,9 @@ function post_graph_graph (req, res) { var edges = json.edges; var waitForSync = false; - if (req.parameters.waitForSync) { + if (req.parameters.waitForSync && (req.parameters.waitForSync === "true" || req.parameters.waitForSync === true)) { waitForSync = true; } - var g = new graph.Graph(name, vertices, edges, waitForSync); if (g._properties === null) { @@ -269,9 +268,9 @@ function post_graph_graph (req, res) { "Etag" : g._properties._rev }; + waitForSync = waitForSync || g._gdb.properties().waitForSync; var returnCode = waitForSync ? actions.HTTP_CREATED : actions.HTTP_ACCEPTED; - actions.resultOk(req, res, returnCode, { "graph" : g._properties }, headers ); } catch (err) { @@ -481,7 +480,7 @@ function delete_graph_graph (req, res) { } var waitForSync = g._gdb.properties().waitForSync; - if (req.parameters.waitForSync) { + if (req.parameters.waitForSync && (req.parameters.waitForSync === "true" || req.parameters.waitForSync === true)) { waitForSync = true; } @@ -569,7 +568,7 @@ function post_graph_vertex (req, res, g) { } var waitForSync = g._vertices.properties().waitForSync; - if (req.parameters.waitForSync) { + if (req.parameters.waitForSync && (req.parameters.waitForSync === "true" || req.parameters.waitForSync === true)) { waitForSync = true; } @@ -602,6 +601,9 @@ function post_graph_vertex (req, res, g) { /// @RESTURLPARAM{graph-name,string,required} /// The name of the graph /// +/// @RESTURLPARAM{vertex-name,string,required} +/// The name of the vertex +/// /// @RESTQUERYPARAMETERS /// /// @RESTQUERYPARAM{rev,string,optional} @@ -764,7 +766,7 @@ function delete_graph_vertex (req, res, g) { } var waitForSync = g._vertices.properties().waitForSync; - if (req.parameters.waitForSync) { + if (req.parameters.waitForSync && (req.parameters.waitForSync === "true" || req.parameters.waitForSync === true)) { waitForSync = true; } @@ -806,7 +808,7 @@ function update_graph_vertex (req, res, g, isPatch) { } var waitForSync = g._vertices.properties().waitForSync; - if (req.parameters.waitForSync) { + if (req.parameters.waitForSync && (req.parameters.waitForSync === "true" || req.parameters.waitForSync === true)) { waitForSync = true; } @@ -1397,7 +1399,7 @@ function post_graph_vertex_vertices (req, res, g) { /// /// The call expects a JSON hash array as body with the edge properties: /// -/// - `_key`: The name of the edge. +/// - `_key`: The name of the edge (optional, if edge collection allows user defined keys). /// - `_from`: The name of the from vertex. /// - `_to`: The name of the to vertex. /// - `$label`: A label for the edge (optional). @@ -1449,7 +1451,7 @@ function post_graph_edge (req, res, g) { } var waitForSync = g._edges.properties().waitForSync; - if (req.parameters.waitForSync) { + if (req.parameters.waitForSync && (req.parameters.waitForSync === "true" || req.parameters.waitForSync === true)) { waitForSync = true; } @@ -1487,6 +1489,9 @@ function post_graph_edge (req, res, g) { /// @RESTURLPARAM{graph-name,string,required} /// The name of the graph /// +/// @RESTURLPARAM{edge-name,string,required} +/// The name of the edge +/// /// @RESTQUERYPARAMETERS /// /// @RESTQUERYPARAM{rev,string,optional} @@ -1650,7 +1655,7 @@ function delete_graph_edge (req, res, g) { } var waitForSync = g._edges.properties().waitForSync; - if (req.parameters.waitForSync) { + if (req.parameters.waitForSync && (req.parameters.waitForSync === "true" || req.parameters.waitForSync === true)) { waitForSync = true; } @@ -1692,7 +1697,7 @@ function update_graph_edge (req, res, g, isPatch) { } var waitForSync = g._edges.properties().waitForSync; - if (req.parameters.waitForSync) { + if (req.parameters.waitForSync && (req.parameters.waitForSync === "true" || req.parameters.waitForSync === true)) { waitForSync = true; } diff --git a/js/actions/api-index.js b/js/actions/api-index.js index b264d445f7..66e848e21c 100644 --- a/js/actions/api-index.js +++ b/js/actions/api-index.js @@ -141,8 +141,6 @@ function get_api_indexes (req, res) { /// /// - `id`: The identifier of the index. /// -/// - `type`: The type of the collection. -/// /// All other attributes are type-dependent. /// /// @RESTRETURNCODES diff --git a/js/actions/api-simple.js b/js/actions/api-simple.js index fb20a633c0..1873175e88 100644 --- a/js/actions/api-simple.js +++ b/js/actions/api-simple.js @@ -655,7 +655,7 @@ actions.defineHttp({ /// /// - `limit`: The maximal amount of documents to return. (optional) /// -/// - `index`: If given, the identifier of the fulltext-index to use. (optional) +/// - `index`: The identifier of the fulltext-index to use. /// /// Returns a cursor containing the result, see @ref HttpCursor for details. ///