You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oodt.apache.org by "Rishi Verma (JIRA)" <ji...@apache.org> on 2012/06/14 19:26:42 UTC
[jira] [Created] (OODT-466) Allow MIME type (HTTP content-type)
configurability for product handlers' generated content
Rishi Verma created OODT-466:
--------------------------------
Summary: Allow MIME type (HTTP content-type) configurability for product handlers' generated content
Key: OODT-466
URL: https://issues.apache.org/jira/browse/OODT-466
Project: OODT
Issue Type: Improvement
Components: product server
Affects Versions: 0.3
Reporter: Rishi Verma
Priority: Minor
Fix For: 0.4
Currently, all product handlers specified under [1], or user-defined product handlers, return content in one of two MIME type formats: the MIME type of a given product on disk (usually "application/octet-stream") and "text/xml". The former strategy is the default for all "GET" type handlers, and the latter is the default for all "LIST" handlers. A developer currently cannot specify the desired MIME type for either type of handler. This feature is needed if a transformation of a product occurs, such that the RAW product is not actually returned, but information about or based upon the product is returned. For example, the MD5 handler [2] is such a use-case, and would be more usable by end-users in a browser setting if it returned content in the form of the MIME type "text/plain". There are many other example use-cases of this.
I propose to allow a developer to configure the MIME type of generated content for all "GET" handlers, using the following methodology:
1. Allow the developer to optionally specify a MIME type of a given handler in the OFSN XML configuration file's handler configuration block [3]
2. If the user specifies a MIME type, this MIME type will be fed into the MIME type specification in [4], and set as the HTTP server's returned content-type
3. If the user specifies a MIME type, but it is invalid, then the default MIME type of "application/octet-stream" will be used
4. If the user does NOT specify a MIME type for a handler, then the default behavior of using the MIME type of a given product on disk will be enacted (ie. the default behavior of all "GET" handlers right now)
--
[1] http://svn.apache.org/repos/asf/oodt/tags/0.3/product/src/main/java/org/apache/oodt/product/handlers/ofsn/
[2] http://svn.apache.org/repos/asf/oodt/tags/0.3/product/src/main/java/org/apache/oodt/product/handlers/ofsn/MD5GetHandler.java
[3] http://svn.apache.org/repos/asf/oodt/tags/0.3/product/src/main/conf/ofsn-ps.xml
[4] http://svn.apache.org/repos/asf/oodt/tags/0.3/product/src/main/java/org/apache/oodt/product/handlers/ofsn/OFSNFileHandler.java
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (OODT-466) Allow MIME type (HTTP content-type)
configurability for product handlers' generated content
Posted by "Rishi Verma (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OODT-466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rishi Verma resolved OODT-466.
------------------------------
Resolution: Fixed
Resolved in rev. 1364745
> Allow MIME type (HTTP content-type) configurability for product handlers' generated content
> -------------------------------------------------------------------------------------------
>
> Key: OODT-466
> URL: https://issues.apache.org/jira/browse/OODT-466
> Project: OODT
> Issue Type: Improvement
> Components: product server
> Affects Versions: 0.3, 0.4
> Reporter: Rishi Verma
> Assignee: Rishi Verma
> Priority: Minor
> Fix For: 0.5
>
> Attachments: OODT-466.rverma.120614.patch.txt
>
>
> Currently, all product handlers specified under [1], or user-defined product handlers, return content in one of two MIME type formats: the MIME type of a given product on disk (usually "application/octet-stream") and "text/xml". The former strategy is the default for all "GET" type handlers, and the latter is the default for all "LIST" handlers. A developer currently cannot specify the desired MIME type for either type of handler. This feature is needed if a transformation of a product occurs, such that the RAW product is not actually returned, but information about or based upon the product is returned. For example, the MD5 handler [2] is such a use-case, and would be more usable by end-users in a browser setting if it returned content in the form of the MIME type "text/plain". There are many other example use-cases of this.
> I propose to allow a developer to configure the MIME type of generated content for all "GET" handlers, using the following methodology:
> 1. Allow the developer to optionally specify a MIME type of a given handler in the OFSN XML configuration file's handler configuration block [3]
> 2. If the user specifies a MIME type, this MIME type will be fed into the MIME type specification in [4], and set as the HTTP server's returned content-type
> 3. If the user specifies a MIME type, but it is invalid, then the default MIME type of "application/octet-stream" will be used
> 4. If the user does NOT specify a MIME type for a handler, then the default behavior of using the MIME type of a given product on disk will be enacted (ie. the default behavior of all "GET" handlers right now)
> --
> [1] http://svn.apache.org/repos/asf/oodt/tags/0.3/product/src/main/java/org/apache/oodt/product/handlers/ofsn/
> [2] http://svn.apache.org/repos/asf/oodt/tags/0.3/product/src/main/java/org/apache/oodt/product/handlers/ofsn/MD5GetHandler.java
> [3] http://svn.apache.org/repos/asf/oodt/tags/0.3/product/src/main/conf/ofsn-ps.xml
> [4] http://svn.apache.org/repos/asf/oodt/tags/0.3/product/src/main/java/org/apache/oodt/product/handlers/ofsn/OFSNFileHandler.java
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (OODT-466) Allow MIME type (HTTP content-type)
configurability for product handlers' generated content
Posted by "Rishi Verma (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OODT-466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rishi Verma reassigned OODT-466:
--------------------------------
Assignee: Rishi Verma
> Allow MIME type (HTTP content-type) configurability for product handlers' generated content
> -------------------------------------------------------------------------------------------
>
> Key: OODT-466
> URL: https://issues.apache.org/jira/browse/OODT-466
> Project: OODT
> Issue Type: Improvement
> Components: product server
> Affects Versions: 0.3, 0.4
> Reporter: Rishi Verma
> Assignee: Rishi Verma
> Priority: Minor
> Fix For: 0.5
>
> Attachments: OODT-466.rverma.120614.patch.txt
>
>
> Currently, all product handlers specified under [1], or user-defined product handlers, return content in one of two MIME type formats: the MIME type of a given product on disk (usually "application/octet-stream") and "text/xml". The former strategy is the default for all "GET" type handlers, and the latter is the default for all "LIST" handlers. A developer currently cannot specify the desired MIME type for either type of handler. This feature is needed if a transformation of a product occurs, such that the RAW product is not actually returned, but information about or based upon the product is returned. For example, the MD5 handler [2] is such a use-case, and would be more usable by end-users in a browser setting if it returned content in the form of the MIME type "text/plain". There are many other example use-cases of this.
> I propose to allow a developer to configure the MIME type of generated content for all "GET" handlers, using the following methodology:
> 1. Allow the developer to optionally specify a MIME type of a given handler in the OFSN XML configuration file's handler configuration block [3]
> 2. If the user specifies a MIME type, this MIME type will be fed into the MIME type specification in [4], and set as the HTTP server's returned content-type
> 3. If the user specifies a MIME type, but it is invalid, then the default MIME type of "application/octet-stream" will be used
> 4. If the user does NOT specify a MIME type for a handler, then the default behavior of using the MIME type of a given product on disk will be enacted (ie. the default behavior of all "GET" handlers right now)
> --
> [1] http://svn.apache.org/repos/asf/oodt/tags/0.3/product/src/main/java/org/apache/oodt/product/handlers/ofsn/
> [2] http://svn.apache.org/repos/asf/oodt/tags/0.3/product/src/main/java/org/apache/oodt/product/handlers/ofsn/MD5GetHandler.java
> [3] http://svn.apache.org/repos/asf/oodt/tags/0.3/product/src/main/conf/ofsn-ps.xml
> [4] http://svn.apache.org/repos/asf/oodt/tags/0.3/product/src/main/java/org/apache/oodt/product/handlers/ofsn/OFSNFileHandler.java
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OODT-466) Allow MIME type (HTTP content-type)
configurability for product handlers' generated content
Posted by "Chris A. Mattmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OODT-466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chris A. Mattmann updated OODT-466:
-----------------------------------
Affects Version/s: 0.4
Fix Version/s: (was: 0.4)
0.5
> Allow MIME type (HTTP content-type) configurability for product handlers' generated content
> -------------------------------------------------------------------------------------------
>
> Key: OODT-466
> URL: https://issues.apache.org/jira/browse/OODT-466
> Project: OODT
> Issue Type: Improvement
> Components: product server
> Affects Versions: 0.3, 0.4
> Reporter: Rishi Verma
> Priority: Minor
> Fix For: 0.5
>
> Attachments: OODT-466.rverma.120614.patch.txt
>
>
> Currently, all product handlers specified under [1], or user-defined product handlers, return content in one of two MIME type formats: the MIME type of a given product on disk (usually "application/octet-stream") and "text/xml". The former strategy is the default for all "GET" type handlers, and the latter is the default for all "LIST" handlers. A developer currently cannot specify the desired MIME type for either type of handler. This feature is needed if a transformation of a product occurs, such that the RAW product is not actually returned, but information about or based upon the product is returned. For example, the MD5 handler [2] is such a use-case, and would be more usable by end-users in a browser setting if it returned content in the form of the MIME type "text/plain". There are many other example use-cases of this.
> I propose to allow a developer to configure the MIME type of generated content for all "GET" handlers, using the following methodology:
> 1. Allow the developer to optionally specify a MIME type of a given handler in the OFSN XML configuration file's handler configuration block [3]
> 2. If the user specifies a MIME type, this MIME type will be fed into the MIME type specification in [4], and set as the HTTP server's returned content-type
> 3. If the user specifies a MIME type, but it is invalid, then the default MIME type of "application/octet-stream" will be used
> 4. If the user does NOT specify a MIME type for a handler, then the default behavior of using the MIME type of a given product on disk will be enacted (ie. the default behavior of all "GET" handlers right now)
> --
> [1] http://svn.apache.org/repos/asf/oodt/tags/0.3/product/src/main/java/org/apache/oodt/product/handlers/ofsn/
> [2] http://svn.apache.org/repos/asf/oodt/tags/0.3/product/src/main/java/org/apache/oodt/product/handlers/ofsn/MD5GetHandler.java
> [3] http://svn.apache.org/repos/asf/oodt/tags/0.3/product/src/main/conf/ofsn-ps.xml
> [4] http://svn.apache.org/repos/asf/oodt/tags/0.3/product/src/main/java/org/apache/oodt/product/handlers/ofsn/OFSNFileHandler.java
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OODT-466) Allow MIME type (HTTP content-type)
configurability for product handlers' generated content
Posted by "Rishi Verma (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OODT-466?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13419685#comment-13419685 ]
Rishi Verma commented on OODT-466:
----------------------------------
Below is an example use-case for mime type configuration within a product server's ofsn config file (after applying this patch). It shows how the MD5 handler can return text/plain instead of octet-stream:
---
<handler name="MD5" type="get"
class="org.apache.oodt.product.handlers.ofsn.MD5GetHandler">
<property name="mimeType" value="text/plain"/>
</handler>
---
> Allow MIME type (HTTP content-type) configurability for product handlers' generated content
> -------------------------------------------------------------------------------------------
>
> Key: OODT-466
> URL: https://issues.apache.org/jira/browse/OODT-466
> Project: OODT
> Issue Type: Improvement
> Components: product server
> Affects Versions: 0.3, 0.4
> Reporter: Rishi Verma
> Assignee: Rishi Verma
> Priority: Minor
> Fix For: 0.5
>
> Attachments: OODT-466.rverma.120614.patch.txt
>
>
> Currently, all product handlers specified under [1], or user-defined product handlers, return content in one of two MIME type formats: the MIME type of a given product on disk (usually "application/octet-stream") and "text/xml". The former strategy is the default for all "GET" type handlers, and the latter is the default for all "LIST" handlers. A developer currently cannot specify the desired MIME type for either type of handler. This feature is needed if a transformation of a product occurs, such that the RAW product is not actually returned, but information about or based upon the product is returned. For example, the MD5 handler [2] is such a use-case, and would be more usable by end-users in a browser setting if it returned content in the form of the MIME type "text/plain". There are many other example use-cases of this.
> I propose to allow a developer to configure the MIME type of generated content for all "GET" handlers, using the following methodology:
> 1. Allow the developer to optionally specify a MIME type of a given handler in the OFSN XML configuration file's handler configuration block [3]
> 2. If the user specifies a MIME type, this MIME type will be fed into the MIME type specification in [4], and set as the HTTP server's returned content-type
> 3. If the user specifies a MIME type, but it is invalid, then the default MIME type of "application/octet-stream" will be used
> 4. If the user does NOT specify a MIME type for a handler, then the default behavior of using the MIME type of a given product on disk will be enacted (ie. the default behavior of all "GET" handlers right now)
> --
> [1] http://svn.apache.org/repos/asf/oodt/tags/0.3/product/src/main/java/org/apache/oodt/product/handlers/ofsn/
> [2] http://svn.apache.org/repos/asf/oodt/tags/0.3/product/src/main/java/org/apache/oodt/product/handlers/ofsn/MD5GetHandler.java
> [3] http://svn.apache.org/repos/asf/oodt/tags/0.3/product/src/main/conf/ofsn-ps.xml
> [4] http://svn.apache.org/repos/asf/oodt/tags/0.3/product/src/main/java/org/apache/oodt/product/handlers/ofsn/OFSNFileHandler.java
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OODT-466) Allow MIME type (HTTP content-type)
configurability for product handlers' generated content
Posted by "Rishi Verma (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OODT-466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rishi Verma updated OODT-466:
-----------------------------
Attachment: OODT-466.rverma.120614.patch.txt
Patch to resolve issue available for review.
> Allow MIME type (HTTP content-type) configurability for product handlers' generated content
> -------------------------------------------------------------------------------------------
>
> Key: OODT-466
> URL: https://issues.apache.org/jira/browse/OODT-466
> Project: OODT
> Issue Type: Improvement
> Components: product server
> Affects Versions: 0.3
> Reporter: Rishi Verma
> Priority: Minor
> Fix For: 0.4
>
> Attachments: OODT-466.rverma.120614.patch.txt
>
>
> Currently, all product handlers specified under [1], or user-defined product handlers, return content in one of two MIME type formats: the MIME type of a given product on disk (usually "application/octet-stream") and "text/xml". The former strategy is the default for all "GET" type handlers, and the latter is the default for all "LIST" handlers. A developer currently cannot specify the desired MIME type for either type of handler. This feature is needed if a transformation of a product occurs, such that the RAW product is not actually returned, but information about or based upon the product is returned. For example, the MD5 handler [2] is such a use-case, and would be more usable by end-users in a browser setting if it returned content in the form of the MIME type "text/plain". There are many other example use-cases of this.
> I propose to allow a developer to configure the MIME type of generated content for all "GET" handlers, using the following methodology:
> 1. Allow the developer to optionally specify a MIME type of a given handler in the OFSN XML configuration file's handler configuration block [3]
> 2. If the user specifies a MIME type, this MIME type will be fed into the MIME type specification in [4], and set as the HTTP server's returned content-type
> 3. If the user specifies a MIME type, but it is invalid, then the default MIME type of "application/octet-stream" will be used
> 4. If the user does NOT specify a MIME type for a handler, then the default behavior of using the MIME type of a given product on disk will be enacted (ie. the default behavior of all "GET" handlers right now)
> --
> [1] http://svn.apache.org/repos/asf/oodt/tags/0.3/product/src/main/java/org/apache/oodt/product/handlers/ofsn/
> [2] http://svn.apache.org/repos/asf/oodt/tags/0.3/product/src/main/java/org/apache/oodt/product/handlers/ofsn/MD5GetHandler.java
> [3] http://svn.apache.org/repos/asf/oodt/tags/0.3/product/src/main/conf/ofsn-ps.xml
> [4] http://svn.apache.org/repos/asf/oodt/tags/0.3/product/src/main/java/org/apache/oodt/product/handlers/ofsn/OFSNFileHandler.java
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira