Skip to content


Subversion checkout URL

You can clone with
Download ZIP


"Actions" should allow for a return of data #17

moduscreate opened this Issue · 1 comment

2 participants


whatever_action = function() {
return '{ "success" : true}';

In an ideal situation, we should allow for actions to return anything up to the browser, if possible. This gives end developers the full flexibility to custom format strings, etc to be bubbled up to the browser.


Here's a common use case for not supporting your suggestion.

A WWW site has a private login restricted area. There are PDF files that only logged in users are allowed to see, but they're mixed in to some directory where someone does mass uploads of the things.

What I think you want to do is tag, like in the database, which PDF files are private and the rest are not.

So you implement a pdf_action() method that queries the database and redirects to some "can't see this" graphic if the pdf is private, or returns to let the httpd server's normal processing logic serve the pdf.

What happens in your scenario of you return undefined? return true? return false?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.