diff --git a/CHANGELOG b/CHANGELOG index 860989d852..d22b2ded8f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -115,7 +115,7 @@ v1.5.0 (XXXX-XX-XX) currently only implemented for hash indices and skiplist indices. -v1.4.7 (XXXX-XX-XX) +v1.4.7 (2014-01-23) ------------------- * issue #744: Add usage example arangoimp from Command line @@ -164,6 +164,7 @@ v1.4.5 (2014-01-15) * added override file "arangod.conf.local" (and co) + v1.4.4 (2013-12-24) ------------------- diff --git a/Documentation/InstallationManual/InstallingTOC.md b/Documentation/InstallationManual/InstallingTOC.md index 7fc2c994f2..568fd16578 100644 --- a/Documentation/InstallationManual/InstallingTOC.md +++ b/Documentation/InstallationManual/InstallingTOC.md @@ -3,8 +3,8 @@ TOC {#InstallingTOC} - @ref Installing - @ref InstallingLinux - - @ref InstallingLinuxPackageManager - - @ref InstallingDebian + - @ref InstallingLinuxPackageManager + - @ref InstallingDebian - @ref InstallingMacOSX - @ref InstallingMacOSXHomebrew - @ref InstallingMacOSXAppStore diff --git a/js/apps/system/aardvark/api-docs/import.json b/js/apps/system/aardvark/api-docs/import.json index b3f33282da..2d0bddf626 100644 --- a/js/apps/system/aardvark/api-docs/import.json +++ b/js/apps/system/aardvark/api-docs/import.json @@ -41,7 +41,7 @@ "paramType": "query", "required": "True", "name": "type", - "description": "Determines how the body of the request will be interpreted. type can have the following values: " + "description": "Determines how the body of the request will be interpreted. type can have the following values: - documents: when this type is used, each line in the request body is expected to be an individual JSON-encoded document. Multiple JSON documents in the request body need to be separated by newlines. - list: when this type is used, the request body must contain a single JSON-encoded list of individual documents to import. - auto: if set, this will automatically determine the body type (either documents or list). " }, { "dataType": "String", @@ -115,7 +115,7 @@ "paramType": "body", "required": "true", "name": "documents", - "description": "The body must consist of JSON-encoded lists of attribute values, with one line per per document. The first line of the request must be a JSON-encoded list of attribute names. " + "description": "The body must consist of JSON-encoded lists of attribute values, with one line per per document. The first row of the request must be a JSON-encoded list of attribute names. These attribute names are used for the data in the subsequent rows. " }, { "dataType": "String", diff --git a/js/server/modules/org/arangodb/actions.js b/js/server/modules/org/arangodb/actions.js index d26bbfa63f..97aa444523 100644 --- a/js/server/modules/org/arangodb/actions.js +++ b/js/server/modules/org/arangodb/actions.js @@ -1481,13 +1481,46 @@ function resultUnsupported (req, res, headers) { /// @brief internal function for handling redirects //////////////////////////////////////////////////////////////////////////////// -function handleRedirect (req, res, destination, headers) { +function handleRedirect (req, res, options, headers) { + var destination; + var url; + + destination = options.destination; + + if (destination.substr(0,5) !== "http:" && destination.substr(0,6) !== "https:") { + url = req.protocol + "://"; + + if (req.headers.hasOwnProperty('host')) { + url += req.headers.host; + } + else { + url += req.server.address + ":" + req.server.port; + } + + if (options.relative) { + var u = req.url; + + if (0 < u.length && u[u.length - 1] === '/') { + url += "/_db/" + encodeURIComponent(req.database) + u + destination; + } + else { + url += "/_db/" + encodeURIComponent(req.database) + u + "/" + destination; + } + } + else { + url += destination; + } + } + else { + url = destination; + } + res.contentType = "text/html"; res.body = "Moved" + "

Moved

This page has moved to " - + destination + + url + ".

"; if (headers !== undefined) { @@ -1497,56 +1530,39 @@ function handleRedirect (req, res, destination, headers) { res.headers = {}; } - res.headers.location = destination; + res.headers.location = url; } //////////////////////////////////////////////////////////////////////////////// /// @brief generates a permanently redirect /// -/// @FUN{actions.resultPermanentRedirect(@FA{req}, @FA{res}, @FA{destination}, @FA{headers})} +/// @FUN{actions.resultPermanentRedirect(@FA{req}, @FA{res}, @FA{options}, @FA{headers})} /// /// The function generates a redirect response. //////////////////////////////////////////////////////////////////////////////// -function resultPermanentRedirect (req, res, destination, headers) { +function resultPermanentRedirect (req, res, options, headers) { 'use strict'; res.responseCode = exports.HTTP_MOVED_PERMANENTLY; - if (destination.substr(0,5) !== "http:" && destination.substr(0,6) !== "https:") { - if (req.headers.hasOwnProperty('host')) { - destination = req.protocol - + "://" - + req.headers.host - + destination; - } - else { - destination = req.protocol - + "://" - + req.server.address - + ":" - + req.server.port - + destination; - } - } - - handleRedirect(req, res, destination, headers); + handleRedirect(req, res, options, headers); } //////////////////////////////////////////////////////////////////////////////// /// @brief generates a temporary redirect /// -/// @FUN{actions.resultTemporaryRedirect(@FA{req}, @FA{res}, @FA{destination}, @FA{headers})} +/// @FUN{actions.resultTemporaryRedirect(@FA{req}, @FA{res}, @FA{options}, @FA{headers})} /// /// The function generates a redirect response. //////////////////////////////////////////////////////////////////////////////// -function resultTemporaryRedirect (req, res, destination, headers) { +function resultTemporaryRedirect (req, res, options, headers) { 'use strict'; res.responseCode = exports.HTTP_TEMPORARY_REDIRECT; - handleRedirect(req, res, destination, headers); + handleRedirect(req, res, options, headers); } // ----------------------------------------------------------------------------- @@ -1861,10 +1877,10 @@ function redirectRequest (req, res, options, next) { 'use strict'; if (options.permanently) { - resultPermanentRedirect(req, res, options.destination); + resultPermanentRedirect(req, res, options); } else { - resultTemporaryRedirect(req, res, options.destination); + resultTemporaryRedirect(req, res, options); } } diff --git a/js/server/modules/org/arangodb/foxx/authentication.js b/js/server/modules/org/arangodb/foxx/authentication.js index 568f14c979..d7757ce48c 100644 --- a/js/server/modules/org/arangodb/foxx/authentication.js +++ b/js/server/modules/org/arangodb/foxx/authentication.js @@ -1016,7 +1016,7 @@ CookieAuthentication = function (applicationContext, options) { this._options = { name: options.name || this._applicationContext.name + "-session", lifetime: options.lifetime || 3600, - path: options.path || this._applicationContext.mount, + path: options.path || "/", domain: options.path || undefined, secure: options.secure || false, httpOnly: options.httpOnly || false diff --git a/js/server/modules/org/arangodb/foxx/manager.js b/js/server/modules/org/arangodb/foxx/manager.js index 039dfc2776..149f9ae471 100644 --- a/js/server/modules/org/arangodb/foxx/manager.js +++ b/js/server/modules/org/arangodb/foxx/manager.js @@ -642,7 +642,8 @@ function routingAalApp (app, mount, options) { "do" : "org/arangodb/actions/redirectRequest", "options" : { "permanently" : (app._id.substr(0,4) !== 'dev'), - "destination" : p + defaultDocument + "destination" : defaultDocument, + "relative" : true } } }); diff --git a/js/server/version-check.js b/js/server/version-check.js old mode 100644 new mode 100755 index 01680b2be3..e9b01fcf55 --- a/js/server/version-check.js +++ b/js/server/version-check.js @@ -416,7 +416,7 @@ "do": "org/arangodb/actions/redirectRequest", options: { permanently: true, - destination: "/_db/" + db._name() + "/_admin/aardvark/index.html" + destination: "/_db/" + encodeURIComponent(db._name()) + "/_admin/aardvark/index.html" } }, priority: -1000000