webdav-interop
  1. webdav-interop
  2. WEBDAV_INTEROP-4

Actual resource's OPTIONS implementation is skipped

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: current
    • Fix Version/s: milestone 1
    • Component/s: www
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      4

      Description

      Current WindowsRedirectorPatchResourceFilter is never calling the original
      OPTIONS implementation of the backing resource, but always directly returns an
      empty response to the caller. This is not very clever, since a resource might
      want to return "Allow=GET,DELETE,MOVE,COPY,PROPFIND,OPTIONS,HEAD,PUT,PROPPATCH"
      to indicate the implemented methods.

      Proposes Correction:

      Adding a call to chain.doFilter() at the end of the OPTIONS processing and
      using addHeader instead of setHeader (see commented lines below):

      case OPTIONS:
      ...
      response.setStatus(SC_NO_CONTENT);
      response.setHeader("DAV", "1");
      }

      chain.doFilter(servletRequest, servletResponse); // ADDING THIS

      // if options, MiniRedir
      // return "MS-Author-Via" = "DAV"
      response.addHeader("MS-Author-Via", "DAV"); // MODIFYING THIS
      break;

        Activity

        Hide
        mkarg added a comment -

        Daniel, what do you think about this? For me, the proposed solution seems to
        work, but it is originally your code, so I leave the actual fix open to you.

        Show
        mkarg added a comment - Daniel, what do you think about this? For me, the proposed solution seems to work, but it is originally your code, so I leave the actual fix open to you.
        Hide
        daniel_manzke added a comment -

        I will implement the proposed way. I will also add a check if the headers are
        present. If they are present, I won't overwrite them. (for DAV and MS-Author-Via)
        The returned Status Code (NO CONTENT/204) won't be changed.

        Show
        daniel_manzke added a comment - I will implement the proposed way. I will also add a check if the headers are present. If they are present, I won't overwrite them. (for DAV and MS-Author-Via) The returned Status Code (NO CONTENT/204) won't be changed.
        Hide
        daniel_manzke added a comment -

        Fixed

        Show
        daniel_manzke added a comment - Fixed

          People

          • Assignee:
            daniel_manzke
            Reporter:
            mkarg
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: