Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-1785

If header checking lacks etag checks

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • jackrabbit-webdav
    • None

    Description

      The evaluation of the WebDAV If header seems to lack Etag checks. For instance, this test case:

      public void testPutIfEtag() throws HttpException, IOException, DavException, URISyntaxException {

      String testuri = this.root + "iftest";

      int status;
      try

      { PutMethod put = new PutMethod(testuri); String condition = "<" + testuri + "> ([" + "\"an-etag-this-testcase-invented\"" + "])"; put.setRequestEntity(new StringRequestEntity("1")); put.setRequestHeader("If", condition); status = this.client.executeMethod(put); assertEquals("status: " + status, 412, status); }

      finally

      { DeleteMethod delete = new DeleteMethod(testuri); status = this.client.executeMethod(delete); assertTrue("status: " + status, status == 200 || status == 204 || status == 404); }

      }

      fails, as the PUT request gets executed, although it should have been rejected with Precondition Failed.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              reschke Julian Reschke
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: