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 ju...@apache.org on 2001/08/02 15:19:41 UTC

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

juergen     01/08/02 06:19:41

  Modified:    src/webdav/server/org/apache/slide/webdav/method
                        WebdavMethod.java
  Log:
  the Slide url decode method did not work for German "Umlaute". Using the decode method in java.net it did work. Still it is used in the client part (httpClient.State) there it should/must(?) be changed too. Any objections?
  
  Revision  Changes    Path
  1.33      +8 -9      jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/WebdavMethod.java
  
  Index: WebdavMethod.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/WebdavMethod.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- WebdavMethod.java	2001/08/01 16:30:58	1.32
  +++ WebdavMethod.java	2001/08/02 13:19:40	1.33
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/WebdavMethod.java,v 1.32 2001/08/01 16:30:58 cmlenz Exp $
  - * $Revision: 1.32 $
  - * $Date: 2001/08/01 16:30:58 $
  + * $Header: /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/WebdavMethod.java,v 1.33 2001/08/02 13:19:40 juergen Exp $
  + * $Revision: 1.33 $
  + * $Date: 2001/08/02 13:19:40 $
    *
    * ====================================================================
    *
  @@ -68,6 +68,7 @@
   import java.security.NoSuchAlgorithmException;
   import java.io.*;
   import java.util.*;
  +import java.net.URLDecoder;
   
   import javax.servlet.*;
   import javax.servlet.http.*;
  @@ -545,7 +546,7 @@
        * Parse WebDAV XML request body, and return the DOM representation.
        *
        * @exception ParserConfigurationException If the JAXP factory cannot
  -     *             configure a parser given its current configuration 
  +     *             configure a parser given its current configuration
        *             parameters.
        * @exception SAXException If any parse errors occur.
        * @exception IOException If any IO errors occur.
  @@ -556,7 +557,7 @@
           if (requestBody == null) {
               readRequestContent();
               if (requestBody == null) {
  -                // there is no request content body, so there's nothing to 
  +                // there is no request content body, so there's nothing to
                   // parse
                   return null;
               }
  @@ -608,10 +609,8 @@
           // which also handles encoded spaces so we can skip that later.
           // Placed at the beginning of the chain so that encoded
           // bad stuff(tm) can be caught by the later checks
  -        String normalized = path;
  -        if (normalized.indexOf('%') >= 0)
  -            // FIXME: Use configurable encoding here.
  -            normalized = URLUtil.URLDecode(normalized, "UTF8");
  +        String normalized = URLDecoder.decode(path);  // delegate it to java.net
  +        
           if (normalized == null)
               return (null);