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 je...@apache.org on 2001/05/01 09:55:09 UTC

cvs commit: jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods PostMethod.java

jericho     01/05/01 00:55:09

  Modified:    src/webdav/client/src/org/apache/webdav/lib State.java
               src/webdav/client/src/org/apache/webdav/lib/methods
                        PostMethod.java
  Log:
  - Adjust the escaping range.
     (Actually, they aren't  within the query component,
      but the values to be escaped)
  
  Revision  Changes    Path
  1.5       +16 -3     jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/State.java
  
  Index: State.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/State.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- State.java	2001/04/30 16:45:59	1.4
  +++ State.java	2001/05/01 07:55:08	1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/State.java,v 1.4 2001/04/30 16:45:59 jericho Exp $
  - * $Revision: 1.4 $
  - * $Date: 2001/04/30 16:45:59 $
  + * $Header: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/State.java,v 1.5 2001/05/01 07:55:08 jericho Exp $
  + * $Revision: 1.5 $
  + * $Date: 2001/05/01 07:55:08 $
    *
    * ====================================================================
    *
  @@ -269,6 +269,19 @@
   
   
       // --------------------------------------------------------- Public Methods
  +
  +
  +
  +    /**
  +     * Escape with character encoding of the general purpose.
  +     */
  +    public String URLEncode(String str) {
  +        if (encodeURLs) {
  +            return URIUtil.escape(str, null, URLEncodingCharset);
  +        } else {
  +            return str;
  +        }
  +    }
   
   
       /**
  
  
  
  1.8       +5 -5      jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods/PostMethod.java
  
  Index: PostMethod.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods/PostMethod.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- PostMethod.java	2001/04/30 16:46:14	1.7
  +++ PostMethod.java	2001/05/01 07:55:08	1.8
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods/PostMethod.java,v 1.7 2001/04/30 16:46:14 jericho Exp $
  - * $Revision: 1.7 $
  - * $Date: 2001/04/30 16:46:14 $
  + * $Header: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/methods/PostMethod.java,v 1.8 2001/05/01 07:55:08 jericho Exp $
  + * $Revision: 1.8 $
  + * $Date: 2001/05/01 07:55:08 $
    *
    * ====================================================================
    *
  @@ -196,9 +196,9 @@
               while (names.hasMoreElements()) {
                   String name = (String) names.nextElement();
                   String value = (String) parameters.get(name);
  -                sb.append(state.URLEncodeQuery(name));
  +                sb.append(state.URLEncode(name));
                   sb.append("=");
  -                sb.append(state.URLEncodeQuery(value));
  +                sb.append(state.URLEncode(value));
                   if (names.hasMoreElements())
                       sb.append("&");
               }