[ 
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

        

Reply via email to