/en/wills_acrid_workspace/id rename

author:

published:

updated:

source uri:

Acre Doc /freebase/acre_doc

Handler:

Default Configuration:

Acre Doc /freebase/acre_doc

Handler:

Default Configuration:

Summary

//
// this script forwards to an acre script with an arbitrary id
// taken from the path_info in...

Content

//
// this script forwards to an acre script with an arbitrary id
// taken from the path_info in the url.
// note that the path_info can't be effectively used by the
// other script after that, so it is erased.
//
var scriptid = acre.environ.path_info;

var q = acre.mqlread({
"type" : "/common/document",
"id" : scriptid,
"content" : null
});

if (!q) {
acre.start_response(404, {
'content-type': 'text/plain; charset="UTF-8"'

});
acre.write('script document not found: ' + scriptid + '\n');

acre.exit();
};

acre.environ.path_info = '/';
acre.environ.script_id = scriptid;
//var m = /^(.*)/([^\/]+)$/.exec(scriptid);
//acre.environ.script_namespace = m[1];
//acre.environ.script_name = m[2];

// this script is expected to do start_response etc.
acre.load(acre.environ.freebase_service_url + '/api/trans/raw' + scriptid);


Created by: nix Feb 28, 2008
Last edited by: Constant Gardener Process Aug 18, 2009

Recent Discussions about None

There is no discussion about this document.

Start the Discussion »
Explore the Data
View all the data we have for /en/wills_acrid_workspace/id
Flag this Document
Why do you want to flag this document?