Uploaded image for project: 'Olingo'
  1. Olingo
  2. OLINGO-1433

Allow HEAD requests on media streams

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • (Java) V4 4.7.1
    • None
    • odata4-server

    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.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            baylej Jonathan Bayle

            Dates

              Created:
              Updated:

              Issue deployment