tika-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] [Created] (TIKA-942) HTTP Accept header evaluator
Date Sun, 24 Jun 2012 18:24:43 GMT
Jukka Zitting created TIKA-942:
----------------------------------

             Summary: HTTP Accept header evaluator
                 Key: TIKA-942
                 URL: https://issues.apache.org/jira/browse/TIKA-942
             Project: Tika
          Issue Type: New Feature
          Components: mime
            Reporter: Jukka Zitting


The HTTP Accept header (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html) provides a
flexible mechanism for an HTTP client to express its preferences for different response media
types. Unfortunately processing Accept headers on the server side is quite complicated because
of the somewhat complicated syntax and the possibility of media type inheritance relationships
(can I respond with application/xml if the client requests text/plain?).

The media type registry in Tika is perfect for resolving such cases, so I'd like to introduce
a new {{String resolveHttpAccept(String accept, String... types)}} method in the Tika facade.
The method would take the value of an HTTP accept header and evaluate it against the given
media types supported by a server, using the configured media type registry for type inheritance
information. The method would then return the best match from among the given media types,
or {{application/octet-stream}} if none of the listed types would be accepted by the client.

--
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

        

Mime
View raw message