You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by pn...@apache.org on 2002/09/20 17:21:02 UTC

cvs commit: jakarta-slide/src/webdav/server/org/apache/slide/webdav/method PutMethod.java

pnever      2002/09/20 08:21:02

  Modified:    src/webdav/server/org/apache/slide/webdav/method
                        PutMethod.java
  Log:
  Adaptation to previous changes in UriHandler
  
  Revision  Changes    Path
  1.57      +14 -3     jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/PutMethod.java
  
  Index: PutMethod.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/PutMethod.java,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- PutMethod.java	14 Aug 2002 15:36:49 -0000	1.56
  +++ PutMethod.java	20 Sep 2002 15:21:02 -0000	1.57
  @@ -170,9 +170,20 @@
           // check destination URI
           UriHandler destinationUriHandler = UriHandler.getUriHandler(resourcePath);
           if (destinationUriHandler.isRestrictedUri()) {
  +            boolean sendError = true;
  +            if( destinationUriHandler.isWorkingresourceUri() ) {
  +                // PUT on existing WRs is *not* restricted !!!
  +                try {
  +                    content.retrieve(slideToken, resourcePath);
  +                    sendError = false;
  +                }
  +                catch( Exception x ) {};
  +            }
  +            if( sendError ) {
               int statusCode = WebdavStatus.SC_FORBIDDEN;
               sendError( statusCode, getClass().getName()+".restrictedDestinationUri", new Object[]{resourcePath} );
               throw new WebdavException( statusCode );
  +        }
           }
           
           try {
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>