View Javadoc

1   // ========================================================================
2   // Copyright (c) 2010-2011 Mort Bay Consulting Pty. Ltd.
3   // ------------------------------------------------------------------------
4   // All rights reserved. This program and the accompanying materials
5   // are made available under the terms of the Eclipse Public License v1.0
6   // and Apache License v2.0 which accompanies this distribution.
7   // The Eclipse Public License is available at 
8   // http://www.eclipse.org/legal/epl-v10.html
9   // The Apache License v2.0 is available at
10  // http://www.opensource.org/licenses/apache2.0.php
11  // You may elect to redistribute this code under either of these licenses. 
12  // ========================================================================
13  package org.eclipse.jetty.nested;
14  
15  
16  import javax.servlet.http.HttpServletRequest;
17  
18  import org.eclipse.jetty.http.HttpSchemes;
19  import org.eclipse.jetty.server.Request;
20  
21  public class NestedRequest extends Request
22  {
23      private final HttpServletRequest _outer;
24      
25      public NestedRequest(HttpServletRequest outer)
26      {
27          _outer=outer;
28      }
29      
30      void setConnection(NestedConnection connection)
31      {
32          super.setConnection(connection);
33      }
34  
35      public boolean isSecure()
36      {
37          return _outer.isSecure() || HttpSchemes.HTTPS.equals(getScheme());
38      }
39      
40  }