jakarta-cactus-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cml...@apache.org
Subject cvs commit: jakarta-cactus/framework/src/java/share/org/apache/cactus WebResponse.java
Date Mon, 07 Jul 2003 10:50:07 GMT
cmlenz      2003/07/07 03:50:07

  Modified:    framework/src/java/share/org/apache/cactus WebResponse.java
  Log:
  Don't use the deprecated HttpClient method Cookie.parse(), which has now been removed from
HttpClient 2.1
  
  Revision  Changes    Path
  1.15      +7 -5      jakarta-cactus/framework/src/java/share/org/apache/cactus/WebResponse.java
  
  Index: WebResponse.java
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/WebResponse.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- WebResponse.java	22 Jun 2003 15:03:54 -0000	1.14
  +++ WebResponse.java	7 Jul 2003 10:50:07 -0000	1.15
  @@ -70,6 +70,8 @@
   import org.apache.cactus.util.IoUtil;
   import org.apache.commons.httpclient.Header;
   import org.apache.commons.httpclient.HttpException;
  +import org.apache.commons.httpclient.cookie.CookiePolicy;
  +import org.apache.commons.httpclient.cookie.CookieSpec;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   
  @@ -276,6 +278,7 @@
           String headerValue = this.connection.getHeaderField(0);
   
           Vector cookieVector = new Vector();
  +        CookieSpec cookieSpec = CookiePolicy.getDefaultSpec();
   
           for (int i = 1; (headerName != null) || (headerValue != null); i++)
           {
  @@ -288,17 +291,16 @@
               {
                   // Parse the cookie definition
                   org.apache.commons.httpclient.Cookie[] cookies;
  -
                   try
                   {
  -                    cookies = org.apache.commons.httpclient.Cookie.parse(
  +                    cookies = cookieSpec.parse(
                           CookieUtil.getCookieDomain(getWebRequest(), 
                               getConnection().getURL().getHost()), 
                           CookieUtil.getCookiePort(getWebRequest(), 
                               getConnection().getURL().getPort()), 
                           CookieUtil.getCookiePath(getWebRequest(), 
  -                            getConnection().getURL().getFile()), 
  -                        new Header(headerName, headerValue));
  +                            getConnection().getURL().getFile()),
  +                        false, new Header(headerName, headerValue));
                   }
                   catch (HttpException e)
                   {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-dev-help@jakarta.apache.org


Mime
View raw message