You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2002/03/08 06:15:51 UTC

cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote Request.java

remm        02/03/07 21:15:51

  Modified:    coyote/src/java/org/apache/coyote Request.java
  Log:
  - Add a secure flag on the request.
  
  Revision  Changes    Path
  1.5       +15 -4     jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Request.java
  
  Index: Request.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Request.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Request.java	31 Jan 2002 18:42:29 -0000	1.4
  +++ Request.java	8 Mar 2002 05:15:51 -0000	1.5
  @@ -121,10 +121,13 @@
       // ----------------------------------------------------- Instance Variables
   
   
  -    protected int serverPort;
  +    protected int serverPort = -1;
  +    protected MessageBytes serverNameMB = new MessageBytes();
  +
       protected String localHost;
   
       protected MessageBytes schemeMB = new MessageBytes();
  +    protected boolean secure = false;
   
       protected MessageBytes methodMB = new MessageBytes();
       protected MessageBytes unparsedURIMB = new MessageBytes();
  @@ -166,7 +169,6 @@
       protected int available = -1; 
       protected MessageBytes contentTypeMB = null;
       protected String charEncoding = null;
  -    protected MessageBytes serverNameMB = new MessageBytes();
       protected Cookies cookies = new Cookies(headers);
   
   
  @@ -233,14 +235,15 @@
       public MessageBytes serverName() {
   	return serverNameMB;
       }
  -    
  +
       public int getServerPort() {
           return serverPort;
       }
  -
  +    
       public void setServerPort(int serverPort ) {
   	this.serverPort=serverPort;
       }
  +
       public MessageBytes remoteAddr() {
   	return remoteAddrMB;
       }
  @@ -257,6 +260,13 @@
   	this.localHost = host;
       }
   
  +    public boolean isSecure() {
  +        return secure;
  +    }
  +
  +    public void setSecure(boolean secure) {
  +        this.secure = secure;
  +    }
   
       // -------------------- encoding/type --------------------
   
  @@ -398,6 +408,7 @@
   
   	// XXX Do we need such defaults ?
           schemeMB.setString("http");
  +        secure = false;
   	methodMB.setString("GET");
           uriMB.setString("/");
           queryMB.setString("");
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote Request.java

Posted by Remy Maucherat <re...@apache.org>.
> > > That's the problem at the moment. I'm still undecided as to what goes
> where.
> > > The 'secure' flag may be Catalina specific (and the processor has no
> clue
> > > whether or not the connection is secure; it's the connector which
knows
> > > that), so I moving it to the adapter.
> > >
> I was just asking. :)  3.3.x has the flag as well, since isSecure() is
also
> in 2.2.  It's just that I wasn't planning on exposing the o.a.c.Request to
> the rest of Tomcat so if nobody was ever going to look at the flag, I
could
> ignore it.

Maybe I'll put it back then :-)

> > Catalina uses the "secure" property of the current HTTP connector to
give
> > the right answer to ServletRequest.isSecure().  I imagine the same thing
> > will need to be done for Coyote (and the "secure" flag would also need
to
> > be sent along for a JK request because it can vary each time???).
> >
> > > The API may change a bit. Maybe it will become closer to the one used
by
> TC
> > > 3.3. I hope you don't mind the API stability problems too much ...
> > > Hopefully, it will be stable soon.
> > >
> I don't mind at all. :)

Good. I did a few changes, so that the 3.3 adapter can use the tc-util
provided cookie and parameter parsing. The TC 4 adapter doesn't use that
cookie parser, because there's no incentive performance wise (the object
would have to be wrapped by facades, which would create some GC).

Given the tester results (only one 'real' failure, on a really nasty test),
I'd say the new HTTP stack is ready for some testing. The next TC 4 nightly
should have a usable version.
To use it, install the nightly, and access port 8081 instead on 8080.

Remy


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote Request.java

Posted by Bill Barker <wb...@wilshire.com>.
----- Original Message -----
From: "Craig R. McClanahan" <cr...@apache.org>
To: "Tomcat Developers List" <to...@jakarta.apache.org>
Sent: Friday, March 08, 2002 11:40 AM
Subject: Re: cvs commit:
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote Request.java


>
>
> On Fri, 8 Mar 2002, Remy Maucherat wrote:
>
> > Date: Fri, 8 Mar 2002 11:20:57 -0800
> > From: Remy Maucherat <re...@apache.org>
> > Reply-To: Tomcat Developers List <to...@jakarta.apache.org>
> > To: Tomcat Developers List <to...@jakarta.apache.org>
> > Subject: Re: cvs commit:
> >     jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote
Request.java
> >
> > > I've just started the 3.3.x port of Coyote.  I can manage to set this
one,
> > > but who uses it?  The Processor (currently) doesn't look at it
(AFAIK).
> >
> > That's the problem at the moment. I'm still undecided as to what goes
where.
> > The 'secure' flag may be Catalina specific (and the processor has no
clue
> > whether or not the connection is secure; it's the connector which knows
> > that), so I moving it to the adapter.
> >
I was just asking. :)  3.3.x has the flag as well, since isSecure() is also
in 2.2.  It's just that I wasn't planning on exposing the o.a.c.Request to
the rest of Tomcat so if nobody was ever going to look at the flag, I could
ignore it.
>
> Catalina uses the "secure" property of the current HTTP connector to give
> the right answer to ServletRequest.isSecure().  I imagine the same thing
> will need to be done for Coyote (and the "secure" flag would also need to
> be sent along for a JK request because it can vary each time???).
>
> > The API may change a bit. Maybe it will become closer to the one used by
TC
> > 3.3. I hope you don't mind the API stability problems too much ...
> > Hopefully, it will be stable soon.
> >
I don't mind at all. :)
> > Remy
> >
>
> Craig
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote Request.java

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Fri, 8 Mar 2002, Remy Maucherat wrote:

> Date: Fri, 8 Mar 2002 11:20:57 -0800
> From: Remy Maucherat <re...@apache.org>
> Reply-To: Tomcat Developers List <to...@jakarta.apache.org>
> To: Tomcat Developers List <to...@jakarta.apache.org>
> Subject: Re: cvs commit:
>     jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote Request.java
>
> > I've just started the 3.3.x port of Coyote.  I can manage to set this one,
> > but who uses it?  The Processor (currently) doesn't look at it (AFAIK).
>
> That's the problem at the moment. I'm still undecided as to what goes where.
> The 'secure' flag may be Catalina specific (and the processor has no clue
> whether or not the connection is secure; it's the connector which knows
> that), so I moving it to the adapter.
>

Catalina uses the "secure" property of the current HTTP connector to give
the right answer to ServletRequest.isSecure().  I imagine the same thing
will need to be done for Coyote (and the "secure" flag would also need to
be sent along for a JK request because it can vary each time???).

> The API may change a bit. Maybe it will become closer to the one used by TC
> 3.3. I hope you don't mind the API stability problems too much ...
> Hopefully, it will be stable soon.
>
> Remy
>

Craig


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote Request.java

Posted by Remy Maucherat <re...@apache.org>.
> I've just started the 3.3.x port of Coyote.  I can manage to set this one,
> but who uses it?  The Processor (currently) doesn't look at it (AFAIK).

That's the problem at the moment. I'm still undecided as to what goes where.
The 'secure' flag may be Catalina specific (and the processor has no clue
whether or not the connection is secure; it's the connector which knows
that), so I moving it to the adapter.

The API may change a bit. Maybe it will become closer to the one used by TC
3.3. I hope you don't mind the API stability problems too much ...
Hopefully, it will be stable soon.

Remy


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote Request.java

Posted by Bill Barker <wb...@wilshire.com>.
I've just started the 3.3.x port of Coyote.  I can manage to set this one,
but who uses it?  The Processor (currently) doesn't look at it (AFAIK).
----- Original Message -----
From: <re...@apache.org>
To: <ja...@apache.org>
Sent: Thursday, March 07, 2002 9:15 PM
Subject: cvs commit:
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote Request.java


> remm        02/03/07 21:15:51
>
>   Modified:    coyote/src/java/org/apache/coyote Request.java
>   Log:
>   - Add a secure flag on the request.
>
>   Revision  Changes    Path
>   1.5       +15 -4
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Request.java
>
>   Index: Request.java
>   ===================================================================
>   RCS file:
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/Reques
t.java,v
>   retrieving revision 1.4
>   retrieving revision 1.5
>   diff -u -r1.4 -r1.5
>   --- Request.java 31 Jan 2002 18:42:29 -0000 1.4
>   +++ Request.java 8 Mar 2002 05:15:51 -0000 1.5
>   @@ -121,10 +121,13 @@
>        // ----------------------------------------------------- Instance
Variables
>
>
>   -    protected int serverPort;
>   +    protected int serverPort = -1;
>   +    protected MessageBytes serverNameMB = new MessageBytes();
>   +
>        protected String localHost;
>
>        protected MessageBytes schemeMB = new MessageBytes();
>   +    protected boolean secure = false;
>
>        protected MessageBytes methodMB = new MessageBytes();
>        protected MessageBytes unparsedURIMB = new MessageBytes();
>   @@ -166,7 +169,6 @@
>        protected int available = -1;
>        protected MessageBytes contentTypeMB = null;
>        protected String charEncoding = null;
>   -    protected MessageBytes serverNameMB = new MessageBytes();
>        protected Cookies cookies = new Cookies(headers);
>
>
>   @@ -233,14 +235,15 @@
>        public MessageBytes serverName() {
>    return serverNameMB;
>        }
>   -
>   +
>        public int getServerPort() {
>            return serverPort;
>        }
>   -
>   +
>        public void setServerPort(int serverPort ) {
>    this.serverPort=serverPort;
>        }
>   +
>        public MessageBytes remoteAddr() {
>    return remoteAddrMB;
>        }
>   @@ -257,6 +260,13 @@
>    this.localHost = host;
>        }
>
>   +    public boolean isSecure() {
>   +        return secure;
>   +    }
>   +
>   +    public void setSecure(boolean secure) {
>   +        this.secure = secure;
>   +    }
>
>        // -------------------- encoding/type --------------------
>
>   @@ -398,6 +408,7 @@
>
>    // XXX Do we need such defaults ?
>            schemeMB.setString("http");
>   +        secure = false;
>    methodMB.setString("GET");
>            uriMB.setString("/");
>            queryMB.setString("");
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>