Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-1377

modeshape-web-jcr-webdav throws 500 Internal Server Error accessing repository with trailing slash

    XMLWordPrintable

Details

    Description

      I created a straightforward WAR having the ModeShape WebDAV Servlet, configured one repository "bolehaja" with a few workspaces.

      Accessing via WebDAV is OK, however via plain HTTP there is a slight problem.

      This URL is working well:

      http://localhost:8080/bolehaja-dav/bolehaja
      

      However this URL throws 500 error:

      http://localhost:8080/bolehaja-dav/bolehaja/
      
      $ curl -v 'http://localhost:8080/bolehaja-d                 
      * About to connect() to localhost port 8080 (#0)
      *   Trying 127.0.0.1... connected
      * Connected to localhost (127.0.0.1) port 8080 (#0)
      > GET /bolehaja-dav/bolehaja/ HTTP/1.1
      > User-Agent: curl/7.21.6 (x86_64-pc-linux-gnu) libcurl/7.21.6 OpenSSL/1.0.0e zlib/1.2.3.4 libidn/1.22 librtmp/2.3
      > Host: localhost:8080
      > Accept: */*
      > 
      < HTTP/1.1 500 Internal Server Error
      < Server: Apache-Coyote/1.1
      < Content-Type: text/html;charset=utf-8
      < Content-Length: 1002
      < Date: Mon, 23 Jan 2012 13:28:52 GMT
      < Connection: close
      < 
      * Closing connection #0
      <html><head><title>JBoss Web/7.0.7.Final - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server encountered an internal error () that prevented it from fulfilling this request.</u></p><HR size="1" noshade="noshade"><h3>JBoss Web/7.0.7.Final</h3></body></html>
      

      The log when access is OK (no trailing slash):

      20:33:09,000 FINE  [org.modeshape.web.jcr.webdav.ModeShapeWebdavStore] (http--127.0.0.1-8080-2) WebDAV getStoredObject at "/bolehaja" resolved to "/bolehaja/nullnull"
      20:33:09,002 FINE  [org.modeshape.web.jcr.webdav.ModeShapeWebdavStore] (http--127.0.0.1-8080-2) WebDAV getStoredObject at "/bolehaja" resolved to "/bolehaja/nullnull"
      20:33:09,008 FINE  [org.modeshape.web.jcr.webdav.ModeShapeWebdavStore] (http--127.0.0.1-8080-2) WebDAV getStoredObject at "/bolehaja/dev" resolved to "/bolehaja/dev/"
      20:33:09,012 FINE  [org.modeshape.web.jcr.webdav.ModeShapeWebdavStore] (http--127.0.0.1-8080-2) WebDAV getStoredObject at "/bolehaja/staging" resolved to "/bolehaja/staging/"
      20:33:09,015 FINE  [org.modeshape.web.jcr.webdav.ModeShapeWebdavStore] (http--127.0.0.1-8080-2) WebDAV getStoredObject at "/bolehaja/prod" resolved to "/bolehaja/prod/"
      

      Log when error (with trailing slash):

      20:33:18,348 FINE  [org.modeshape.web.jcr.webdav.ModeShapeWebdavStore] (http--127.0.0.1-8080-2) WebDAV getStoredObject at "/bolehaja/" resolved to "/bolehaja/nullnull"
      20:33:18,351 FINE  [org.modeshape.web.jcr.webdav.ModeShapeWebdavStore] (http--127.0.0.1-8080-2) WebDAV getStoredObject at "/bolehaja/" resolved to "/bolehaja/nullnull"
      20:33:18,357 FINE  [org.modeshape.web.jcr.webdav.ModeShapeWebdavStore] (http--127.0.0.1-8080-2) WebDAV getStoredObject at "/bolehaja//dev" resolved to "/bolehaja//dev"
      

      Note that accessing workspaces work either way:

      http://localhost:8080/bolehaja-dav/bolehaja/prod
      http://localhost:8080/bolehaja-dav/bolehaja/prod/

      Attachments

        Issue Links

          Activity

            People

              hchiorean Horia Chiorean (Inactive)
              HendyIrawan Hendy Irawan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: