[ 
https://issues.apache.org/jira/browse/OLINGO-1433?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Bayle updated OLINGO-1433:
-----------------------------------
    Attachment: 0001-Allow-HEAD-requests-on-media-streams.patch

> 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
>            Priority: Major
>         Attachments: 0001-Allow-HEAD-requests-on-media-streams.patch
>
>
> 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)

Reply via email to