Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: MODIFIED: util ...

Project highlights: Architectural Overview

joist
Discussion topic

Back to topic list

CVS update: MODIFIED: util ...

Author dlr
Full name Daniel Rall
Date 2001-05-14 13:55:48 PDT
Message User: dlr
  Date: 01/05/14 13:55:48

  Modified: java/org/joist/util URL.java
  Log:
  Added schemeAndDomain() overload.
  
  Revision Changes Path
  1.41 +12 -5 joist/java/org/joist​/util/URL.java
  
  http://joist.tigris.​org/source/browse/jo​ist/java/org/joist/u​til/URL.java.diff?r1​=1.40&r2=1.41
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: URL.java
  ====================​====================​====================​=======
  RCS file: /usr/local/tigris/da​ta/helm/cvs/reposito​ry/joist/java/org/jo​ist/util/URL.java,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -b -r1.40 -r1.41
  --- URL.java 2001/05/14 20:35:33 1.40
  +++ URL.java 2001/05/14 20:55:48 1.41
  @@ -65,7 +65,7 @@
    *
    * @author David C. Pellegrini <A HREF="mailto:davidp@​dataweb-systems.com"​>davidp@dataweb-s​ystems.com</A>​
    * @author <a href="mailto:dlr@col​lab.net">Daniel Rall</a>
  - * @version $Id: URL.java,v 1.40 2001/05/14 20:35:33 dlr Exp $
  + * @version $Id: URL.java,v 1.41 2001/05/14 20:55:48 dlr Exp $
    *
    * Copyright (c) 1999 dataweb systems, inc.
    * Copyright (c) 1999-2001 CollabNet, Inc.
  @@ -209,17 +209,24 @@
   
       static final String DOMAIN_KEY = "domain";
       /**
  + * @see {@link #schemeAndDomain(Htt​pServletRequest req)}
  + */
  + public static StringBuffer schemeAndDomain(WebContext ctx)
  + {
  + return schemeAndDomain(ctx.​getRequest());
  + }
  +
  + /**
        * Generates the leading part of the URL for a page in the domain.
        * This wouldn't be necessary if currentDomain was set in UnsecureServlet
        * *sigh*.
        */
  - public static StringBuffer schemeAndDomain(WebContext context)
  + public static StringBuffer schemeAndDomain(Http​ServletRequest req)
       {
  - HttpServletRequest request = context.getRequest();
           StringBuffer newURL =
  - new StringBuffer(request​.getScheme()).append​("://www.");
  + new StringBuffer(req.get​Scheme()).append(":/​/www.");
           newURL.append(JoistP​roperties.getInstanc​e().getProperty(DOMA​IN_KEY));
  - int p = request.getServerPort();
  + int p = req.getServerPort();
           if (p != HTTP_PORT) newURL.append(':').append(p);
           return newURL;
       }
  
  
  

--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: cvs-unsubscribe@jois​t.tigris.org
For additional commands, e-mail: cvs-help at joist dot tigris dot org

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

CVS update: MODIFIED: util ... dlr Daniel Rall 2001-05-14 13:55:48 PDT
Messages per page: