You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Tobias Bocanegra (JIRA)" <ji...@apache.org> on 2008/11/07 15:02:45 UTC
[jira] Created: (SLING-723) Add configuration to default GET
servlet to produce other kinds of responses.
Add configuration to default GET servlet to produce other kinds of responses.
-----------------------------------------------------------------------------
Key: SLING-723
URL: https://issues.apache.org/jira/browse/SLING-723
Project: Sling
Issue Type: Improvement
Components: Servlets Get
Reporter: Tobias Bocanegra
it would be desirable to configure the default behavior for the default GET servlet. eg:
report=dump -> wil generate some sort of dump (as it does today)
report=dirlisting -> will generate a dir listing of the subnodes.
report={number} -> send an error, eg: 403
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
Re: [jira] Created: (SLING-723) Add configuration to default GET
servlet to produce other kinds of responses.
Posted by Felix Meschberger <fm...@gmail.com>.
Hi all,
The HTML and TXT renderings of the default GET servlet IIRC predate the
JSON servlet, in particular the tidy feature of the JSON servlet. So at
that time these renderings were used as a means of just presenting the
raw data (and as an "error" marker should a correct script/servlet be
missing).
Nowadays, this feature of the HTML/TXT renderings does not seem to be
that important anymore.
Therefore I suggest the following behaviour:
(1) HTML/TXT rendering (extensions "html" and "txt")
Render the resource with its resource type (might still be used for
error detection) and a title along with a listing of the child
resources. For HTML this list will be links, for TXT just plain names.
A configuration option is added, which causes this rendering to be
disabled and a 403/FORBIDDEN status to be sent back.
This behaviour is comparable to directory listing in httpd
(2a) Streaming (no extension or extension "res")
If the resource adapts to an InputStream, the data is streamed back.
If the resource does not adapt to an InputStream and the request has no
extension, a temporary redirect (302/FOUND) is sent back with the same
URL plus the extension ".html" to cause the HTML rendering to be called
for the resource.
If the resource does not adapt to an InputStream and the request
extension is "res", a 404/NOT FOUND is sent back.
(2b) Streaming (no extension or extension "res")
Same as (2a) except that instead of sending 302/FOUND in case 2 (no
InputStream and no extension), the same resource is included with
resource type overwrite "sling/servlet/default" and extension overwrite
"html".
The (2a) approach would allow normal/full support for HTML rendering of
the resource, while this (2b) approach just allows for HTML rendering
with the default fallback resource type.
We could also make behaviour (2a) vs. (2b) configurable.
WDYT ?
Regards
Felix
Tobias Bocanegra (JIRA) schrieb:
> Add configuration to default GET servlet to produce other kinds of responses.
> -----------------------------------------------------------------------------
>
> Key: SLING-723
> URL: https://issues.apache.org/jira/browse/SLING-723
> Project: Sling
> Issue Type: Improvement
> Components: Servlets Get
> Reporter: Tobias Bocanegra
>
>
> it would be desirable to configure the default behavior for the default GET servlet. eg:
>
> report=dump -> wil generate some sort of dump (as it does today)
> report=dirlisting -> will generate a dir listing of the subnodes.
> report={number} -> send an error, eg: 403
>
>
>
[jira] Assigned: (SLING-723) Add configuration to default GET
servlet to produce other kinds of responses.
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Felix Meschberger reassigned SLING-723:
---------------------------------------
Assignee: Felix Meschberger
> Add configuration to default GET servlet to produce other kinds of responses.
> -----------------------------------------------------------------------------
>
> Key: SLING-723
> URL: https://issues.apache.org/jira/browse/SLING-723
> Project: Sling
> Issue Type: Improvement
> Components: Servlets Get
> Reporter: Tobias Bocanegra
> Assignee: Felix Meschberger
>
> it would be desirable to configure the default behavior for the default GET servlet. eg:
> report=dump -> wil generate some sort of dump (as it does today)
> report=dirlisting -> will generate a dir listing of the subnodes.
> report={number} -> send an error, eg: 403
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SLING-723) Add configuration to default GET
servlet to produce other kinds of responses.
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654432#action_12654432 ]
Felix Meschberger commented on SLING-723:
-----------------------------------------
See also http://markmail.org/message/6an5o5d5pup6dydy
Adding functionality to the DefaultGetServlet as follows:
* Add settings to selectively switch off default HTML, TXT, JSON and XML renderings
By default all settings are such that rendering is enabled (for backwards compatibility expectations)
* Enhancing StreamRenderServlet:
- add support to automatically draw index listing (analogous to httpd Options Index)
- add support to include index file (analogous to httpd DirectoryIndex)
- defaults: automatically draw index: off, index files: [ index, index.html ]
* send 403/FORBIDDEN if there is no renderer or index listing is not allowed
(currently 500/INTERNAL SERVER ERROR is sent if no renderer exists)
> Add configuration to default GET servlet to produce other kinds of responses.
> -----------------------------------------------------------------------------
>
> Key: SLING-723
> URL: https://issues.apache.org/jira/browse/SLING-723
> Project: Sling
> Issue Type: Improvement
> Components: Servlets Get
> Reporter: Tobias Bocanegra
> Assignee: Felix Meschberger
>
> it would be desirable to configure the default behavior for the default GET servlet. eg:
> report=dump -> wil generate some sort of dump (as it does today)
> report=dirlisting -> will generate a dir listing of the subnodes.
> report={number} -> send an error, eg: 403
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (SLING-723) Add configuration to default GET servlet
to produce other kinds of responses.
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Felix Meschberger closed SLING-723.
-----------------------------------
Resolution: Fixed
Fix Version/s: Servlets Get 2.0.4
Implemented said functionality in Rev. 724385.
> Add configuration to default GET servlet to produce other kinds of responses.
> -----------------------------------------------------------------------------
>
> Key: SLING-723
> URL: https://issues.apache.org/jira/browse/SLING-723
> Project: Sling
> Issue Type: Improvement
> Components: Servlets Get
> Reporter: Tobias Bocanegra
> Assignee: Felix Meschberger
> Fix For: Servlets Get 2.0.4
>
>
> it would be desirable to configure the default behavior for the default GET servlet. eg:
> report=dump -> wil generate some sort of dump (as it does today)
> report=dirlisting -> will generate a dir listing of the subnodes.
> report={number} -> send an error, eg: 403
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.