commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From morg...@apache.org
Subject cvs commit: jakarta-commons/latka/src/java/org/apache/commons/latka/http RequestImpl.java
Date Wed, 18 Sep 2002 16:00:01 GMT
morgand     2002/09/18 09:00:00

  Modified:    latka/src/java/org/apache/commons/latka/http
                        RequestImpl.java
  Log:
  removed call to deprecated HttpClient method
  
  Revision  Changes    Path
  1.30      +8 -5      jakarta-commons/latka/src/java/org/apache/commons/latka/http/RequestImpl.java
  
  Index: RequestImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/latka/src/java/org/apache/commons/latka/http/RequestImpl.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- RequestImpl.java	4 Sep 2002 02:59:26 -0000	1.29
  +++ RequestImpl.java	18 Sep 2002 16:00:00 -0000	1.30
  @@ -61,6 +61,8 @@
   package org.apache.commons.latka.http;
   // java imports
   import java.net.URL;
  +import java.io.ByteArrayInputStream;
  +import java.io.InputStream;
   import java.io.IOException;
   import java.util.List;
   // latka imports
  @@ -263,7 +265,8 @@
           }
           
           if (_requestBody != null) {
  -            ((PostMethod) _httpMethod).setRequestBody(_requestBody);
  +            InputStream  is = new ByteArrayInputStream(_requestBody.getBytes("UTF-16"));
  +            ((PostMethod) _httpMethod).setRequestBody(is);
           } else {
               List parameters = _parameters.getParameters();
               for (int i = 0; i < parameters.size(); ++i) {
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message