You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Warner Onstine <wa...@warneronstine.com> on 2000/10/18 00:53:18 UTC

[catalina] http 1.1 support

Hi all,
I have been browsing through the archives to try and determine the state of
http 1.1 support. From what I can tell its almost done or its complete.
Could someone confirm this for me?

-warner


Tomcat 3.x nightly builds are zero K

Posted by Daniel Kehoe <ke...@fortuity.com>.
The nightly builds for the Tomcat 3.x Development Tree are all 0K in size.

I followed the link "Tomcat 3.x Development Tree" on the
"Binary Downloads" page at
http://jakarta.apache.org/downloads/binindex.html

I wanted to try a newer build than TC3.2b6.

Daniel
kehoe@fortuity.com

Re: [catalina] JDBCRealm connectionName and connectionPassword

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Daniel Kehoe wrote:

> JDBCRealm in TC3.2b took a connectionName and connectionPassword from the
> server.xml file but these are gone in Catalina's JDBCRealm.
>
> I used HypersonicSQL previously with TC3.2b2 and it worked fine with the
> following:
>             driverName="org.hsql.jdbcDriver"
>             connectionURL="jdbc:HypersonicSQL:../webapps/weblock/web-inf/db/authori
> connectionURL="jdbc:HypersonicSQL:../webapps/weblock/web-inf/db/authority"
>                 connectionName="sa"
>                 connectionPassword=""
>
> There seems to be no way to pass connectionName and connectionPassword to
> TC4.0m2
> and I get an exception when TC4.0m2 starts:
> java.sql.SQLException: User not found
> thrown at JDBCRealm line 649
>

The Tomcat 4 version of JDBCRealm was ported before these properties were added to the
3.x version.  I'd be happy to commit a patch to bring this up to date if anyone would
volunteer to create it ....

>
> Daniel
> kehoe@fortuity.com
>

Craig

====================
See you at ApacheCon Europe <http://www.apachecon.com>!
Session VS01 (23-Oct 13h00-17h00):  Sun Technical Briefing
Session T06  (24-Oct 14h00-15h00):  Migrating Apache JServ
                                    Applications to Tomcat



[catalina] JDBCRealm connectionName and connectionPassword

Posted by Daniel Kehoe <ke...@fortuity.com>.
JDBCRealm in TC3.2b took a connectionName and connectionPassword from the 
server.xml file but these are gone in Catalina's JDBCRealm.

I used HypersonicSQL previously with TC3.2b2 and it worked fine with the 
following:
	    driverName="org.hsql.jdbcDriver"
	    connectionURL="jdbc:HypersonicSQL:../webapps/weblock/web-inf/db/authori 
connectionURL="jdbc:HypersonicSQL:../webapps/weblock/web-inf/db/authority"
		connectionName="sa"
		connectionPassword=""

There seems to be no way to pass connectionName and connectionPassword to 
TC4.0m2
and I get an exception when TC4.0m2 starts:
java.sql.SQLException: User not found
thrown at JDBCRealm line 649

Daniel
kehoe@fortuity.com


Re: [catalina] Null pointer exception in FormAuthenticator

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Daniel Kehoe wrote:

> At 06:22 PM 10/17/00 -0700, you wrote:
> >The particular line in question (like 195 of FormAuthenticator) reads like
> >this:
> >
> >     principal = realm.authenticate(username, password);
> >
> >which should only throw an NPE if you have not configured a realm for this
> >webapp
> >(or for the enclosing <Host> or <Engine> in your server.xml file.  Could
> >you check
> >that file, and/or post it to the list so we can look at it?
>
> Thanks, it was my error. I copied the tag from a TC3.2b2 server.xml file
> without changing the tag name from RequestInterceptor to Realm.
>

Not a problem.  Tomcat shouldn't choke on user errors -- it should (gently :-)
point them out.  Here's at least one more case where we can save someone else the
head scratching ...


> >I'm going to add some validation logic to ensure that a Realm is available
> >if you
> >have specified any sort of authentication -- you'll get an informative logfile
> >message and everyone will be refused access (better safe than sorry ...)
>
> Yes, a logfile message will help anyone else who is as careless as me! How
> about "Realm not found, check your server.xml file."
>

It's there now, and will be in m3 as soon as I build it.

>
> Daniel
> kehoe@fortuity.com
>

Craig

====================
See you at ApacheCon Europe <http://www.apachecon.com>!
Session VS01 (23-Oct 13h00-17h00):  Sun Technical Briefing
Session T06  (24-Oct 14h00-15h00):  Migrating Apache JServ
                                    Applications to Tomcat



Re: [catalina] Null pointer exception in FormAuthenticator

Posted by Daniel Kehoe <ke...@fortuity.com>.
At 06:22 PM 10/17/00 -0700, you wrote:
>The particular line in question (like 195 of FormAuthenticator) reads like 
>this:
>
>     principal = realm.authenticate(username, password);
>
>which should only throw an NPE if you have not configured a realm for this 
>webapp
>(or for the enclosing <Host> or <Engine> in your server.xml file.  Could 
>you check
>that file, and/or post it to the list so we can look at it?

Thanks, it was my error. I copied the tag from a TC3.2b2 server.xml file 
without changing the tag name from RequestInterceptor to Realm.

>I'm going to add some validation logic to ensure that a Realm is available 
>if you
>have specified any sort of authentication -- you'll get an informative logfile
>message and everyone will be refused access (better safe than sorry ...)

Yes, a logfile message will help anyone else who is as careless as me! How 
about "Realm not found, check your server.xml file."

Daniel
kehoe@fortuity.com

Re: [catalina] Null pointer exception in FormAuthenticator

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
The particular line in question (like 195 of FormAuthenticator) reads like this:

    principal = realm.authenticate(username, password);

which should only throw an NPE if you have not configured a realm for this webapp
(or for the enclosing <Host> or <Engine> in your server.xml file.  Could you check
that file, and/or post it to the list so we can look at it?

I'm going to add some validation logic to ensure that a Realm is available if you
have specified any sort of authentication -- you'll get an informative logfile
message and everyone will be refused access (better safe than sorry ...)

Craig



Daniel Kehoe wrote:

> BugRat is not responding. Ok to post this here?
>
> Project: Tomcat
> Category: Bug Report
> SubCategory: New Bug Report
> Class: swbug
> Priority: high
> Severity: serious
> Confidence: public
> Release: 4.0m2
> JVM Release: 1.2.2
> Operating System: NT
> OS Release: 4sp5
> Platform: Intel
> Synopsis: Null pointer exception in FormAuthenticator
>
> Description:
> I have a login form that works fine with TC3.2b2 but fails with TC4.0m2...
>
> java.lang.NullPointerException:
>         at
> org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthent
> icator.java:195)
>         at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
> .java:430)
>         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java,
> Compiled Code)
>         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java,
> Compiled Code)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
>         at org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java,
> Compiled Code)
>         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java,
> Compiled Code)
>         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java,
> Compiled Code)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
> :159)
>         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java,
> Compiled Code)
>         at
> org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java,
>   Compiled Code)
> at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java,
> Compiled Code)
>         at java.lang.Thread.run(Thread.java:479)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org

--
====================
See you at ApacheCon Europe <http://www.apachecon.com>!
Session VS01 (23-Oct 13h00-17h00):  Sun Technical Briefing
Session T06  (24-Oct 14h00-15h00):  Migrating Apache JServ
                                    Applications to Tomcat



[catalina] Null pointer exception in FormAuthenticator

Posted by Daniel Kehoe <ke...@fortuity.com>.
BugRat is not responding. Ok to post this here?

Project: Tomcat
Category: Bug Report
SubCategory: New Bug Report
Class: swbug
Priority: high
Severity: serious
Confidence: public
Release: 4.0m2
JVM Release: 1.2.2
Operating System: NT
OS Release: 4sp5
Platform: Intel
Synopsis: Null pointer exception in FormAuthenticator

Description:
I have a login form that works fine with TC3.2b2 but fails with TC4.0m2...

java.lang.NullPointerException:
	at 
org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthent 
icator.java:195)
	at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase 
.java:430)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java, 
Compiled Code)
	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java, 
Compiled Code)
	at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
	at org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java, 
Compiled Code)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java, 
Compiled Code)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java, 
Compiled Code)
	at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java 
:159)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java, 
Compiled Code)
	at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java, 
  Compiled Code)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java, 
Compiled Code)
	at java.lang.Thread.run(Thread.java:479)

Re: [catalina] http 1.1 support

Posted by Remy Maucherat <re...@apache.org>.
> Remy would be able to answer for sure as to the state of completeness, but
the
> HTTP/1.1 connector in Tomcat 4.0 (org.apache.catalina.connector.http)
seems to
> do all the 1.1-ish things I've tried with it.  Are there particular 1.1
> features you are interested in?

It should support everything that is needed for compliance, but there are a
number of things which could be done better.

For example :
- Connection timeouts need improvements.
- Trailing headers are ignored (you have to parse the whole request body to
get them). I really don't know how to handle this.
- Digest auth support is independent from HTTP/1.1, and is supported. The
implementation could be improved for additional security (it doesn't use the
counters ...).
- Optimizations ...

All these items will be addressed in the future. If you find any outstanding
problems in the connector, please let me know and I'll fix it.

Remy



Re: [catalina] http 1.1 support

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Warner Onstine wrote:

> digest I know is one thing in particular we are interested in.

Do you mean Digest authentication, as described in RFC 2617 (and defined as
optional in the servlet spec)?  Yes, that is supported, along with BASIC,
form-based, and client certificate authentication.


> I guess I'll
> have to review the spec to get more specific, hunh? ;-)
>

Yep :-)

>
> -warner

Craig

====================
See you at ApacheCon Europe <http://www.apachecon.com>!
Session VS01 (23-Oct 13h00-17h00):  Sun Technical Briefing
Session T06  (24-Oct 14h00-15h00):  Migrating Apache JServ
                                    Applications to Tomcat



Re: [catalina] http 1.1 support

Posted by Warner Onstine <wa...@warneronstine.com>.
digest I know is one thing in particular we are interested in. I guess I'll
have to review the spec to get more specific, hunh? ;-)

-warner
----- Original Message -----
From: "Craig R. McClanahan" <Cr...@eng.sun.com>
To: <to...@jakarta.apache.org>
Sent: Tuesday, October 17, 2000 3:57 PM
Subject: Re: [catalina] http 1.1 support


> Warner Onstine wrote:
>
> > Hi all,
> > I have been browsing through the archives to try and determine the state
of
> > http 1.1 support. From what I can tell its almost done or its complete.
> > Could someone confirm this for me?
> >
>
> Remy would be able to answer for sure as to the state of completeness, but
the
> HTTP/1.1 connector in Tomcat 4.0 (org.apache.catalina.connector.http)
seems to
> do all the 1.1-ish things I've tried with it.  Are there particular 1.1
> features you are interested in?
>
> >
> > -warner
> >
>
> Craig
>
> ====================
> See you at ApacheCon Europe <http://www.apachecon.com>!
> Session VS01 (23-Oct 13h00-17h00):  Sun Technical Briefing
> Session T06  (24-Oct 14h00-15h00):  Migrating Apache JServ
>                                     Applications to Tomcat
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
>


Re: [catalina] http 1.1 support

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Warner Onstine wrote:

> Hi all,
> I have been browsing through the archives to try and determine the state of
> http 1.1 support. From what I can tell its almost done or its complete.
> Could someone confirm this for me?
>

Remy would be able to answer for sure as to the state of completeness, but the
HTTP/1.1 connector in Tomcat 4.0 (org.apache.catalina.connector.http) seems to
do all the 1.1-ish things I've tried with it.  Are there particular 1.1
features you are interested in?

>
> -warner
>

Craig

====================
See you at ApacheCon Europe <http://www.apachecon.com>!
Session VS01 (23-Oct 13h00-17h00):  Sun Technical Briefing
Session T06  (24-Oct 14h00-15h00):  Migrating Apache JServ
                                    Applications to Tomcat