Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
(Java) V4 4.7.1
-
None
Description
Dear Olingo developers,
Performing a HEAD request on a media entity's stream URL (`Entity/$value`) throws the following exception:
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)
The change is trivial:
ODataDispatcher.java line 338 change the condition to:
if (method == HttpMethod.GET || method == HttpMethod.HEAD)
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.