You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Jonathan Bayle (Jira)" <ji...@apache.org> on 2020/02/27 14:12:00 UTC

[jira] [Created] (OLINGO-1433) Allow HEAD requests on media streams

Jonathan Bayle created OLINGO-1433:
--------------------------------------

             Summary: Allow HEAD requests on media streams
                 Key: OLINGO-1433
                 URL: https://issues.apache.org/jira/browse/OLINGO-1433
             Project: Olingo
          Issue Type: Bug
          Components: odata4-server
    Affects Versions: (Java) V4 4.7.1
            Reporter: Jonathan Bayle


Dear Olingo developers,

Performing a HEAD request on a media entity's stream URL (`Entity/$value`) throws the following exception:
{code:java}
HTTP method HEAD is not allowed.
  at org.apache.olingo.server.core.ODataDispatcher.throwMethodNotAllowed(ODataDispatcher.java:674)
  at org.apache.olingo.server.core.ODataDispatcher.handleMediaValueDispatching(ODataDispatcher.java:359)
{code}
The change is trivial:

ODataDispatcher.java line 338 change the condition to:
{code:java}
if (method == HttpMethod.GET || method == HttpMethod.HEAD)
{code}
Need:

Our OData service also serves files via media entities.
 Web browsers and download utilities often perform an initial HEAD request to get some informations about the file to download (name, size, ...)

Olingo-odata2 does not prevent HEAD request from reaching the processors implemented by the user.

We would like to migrate our service to OData 4.

Thanks,
Jon.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)