~ubuntu-branches/ubuntu/oneiric/tomcat6/oneiric

« back to all changes in this revision

Viewing changes to java/org/apache/catalina/connector/CoyoteAdapter.java

  • Committer: Bazaar Package Importer
  • Author(s): Thierry Carrez
  • Date: 2010-07-20 14:36:48 UTC
  • mfrom: (2.2.17 sid)
  • Revision ID: james.westby@ubuntu.com-20100720143648-23y81x6cq1kv1z00
Tags: 6.0.28-2
* Add debconf questions for user, group and Java options.
* Use ucf to install /etc/default/tomcat6 from a template
* Drop CATALINA_BASE and CATALINA_HOME from /etc/default/tomcat6 since we
  shouldn't encourage users to change those anyway

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
 *
48
48
 * @author Craig R. McClanahan
49
49
 * @author Remy Maucherat
50
 
 * @version $Revision: 896389 $ $Date: 2010-01-06 12:09:55 +0100 (Mi, 06. Jan 2010) $
 
50
 * @version $Id: CoyoteAdapter.java 953025 2010-06-09 14:30:30Z markt $
51
51
 */
52
52
 
53
53
public class CoyoteAdapter implements Adapter {
592
592
        if (count <= 0)
593
593
            return;
594
594
 
 
595
        String sessionCookieName = getSessionCookieName(context);
 
596
        
595
597
        for (int i = 0; i < count; i++) {
596
598
            ServerCookie scookie = serverCookies.getCookie(i);
597
 
            if (scookie.getName().equals(Globals.SESSION_COOKIE_NAME)) {
 
599
            if (scookie.getName().equals(sessionCookieName)) {
598
600
                // Override anything requested in the URL
599
601
                if (!request.isRequestedSessionIdFromCookie()) {
600
602
                    // Accept only the first session id cookie
868
870
    }
869
871
 
870
872
 
871
 
    // ------------------------------------------------------ Protected Methods
872
 
 
873
 
 
874
873
    /**
875
874
     * Copy an array of bytes to a different position. Used during 
876
875
     * normalization.
882
881
    }
883
882
 
884
883
 
 
884
    private String getSessionCookieName(Context context) {
 
885
        
 
886
        String result = null;
 
887
        
 
888
        if (context != null) {
 
889
            result = context.getSessionCookieName();
 
890
        }
 
891
        
 
892
        if (result == null) {
 
893
            result = Globals.SESSION_COOKIE_NAME;
 
894
        }
 
895
        
 
896
        return result;
 
897
    }
885
898
}