You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Remy Maucherat <re...@apache.org> on 2003/07/18 11:30:35 UTC

[5.0] Tester

I have put the tester back in activity for TC 5 (and it caught the 
failure for error pages), but unfortunately there are a few limitations 
caused by the HTTP client used (for example, if the status is 500, you 
can't read the content). It would be a good idea IMO to switch to 
commons-httpclient (which I'll do, but it's not a very high priority).

Comments ?

Remy



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: [5.0] Tester

Posted by Remy Maucherat <re...@apache.org>.
Craig R. McClanahan wrote:
>I have put the tester back in activity for TC 5 (and it caught the
>>failure for error pages), but unfortunately there are a few limitations
>>caused by the HTTP client used (for example, if the status is 500, you
>>can't read the content). It would be a good idea IMO to switch to
>>commons-httpclient (which I'll do, but it's not a very high priority).
> 
> Switching is fine if you want, but the existing tester does (or at least
> it did) have a mode where it uses a low-level socket instead of
> HttpURLConnection, and therefore doesn't give you the useless garbage on a
> 500.  The trick is to set the "protocol" property to "HTTP/1.0" instead of
> an empty string.

I had missed the executeSocket method. That's useful :)
Switching to HttpClient still makes sense IMO, but is not essential to 
fix some tests.

Remy



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: [5.0] Tester

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

On Fri, 18 Jul 2003, Remy Maucherat wrote:

> Date: Fri, 18 Jul 2003 11:30:35 +0200
> From: Remy Maucherat <re...@apache.org>
> Reply-To: Tomcat Developers List <to...@jakarta.apache.org>
> To: Tomcat Developers List <to...@jakarta.apache.org>
> Subject: [5.0] Tester
>
> I have put the tester back in activity for TC 5 (and it caught the
> failure for error pages), but unfortunately there are a few limitations
> caused by the HTTP client used (for example, if the status is 500, you
> can't read the content). It would be a good idea IMO to switch to
> commons-httpclient (which I'll do, but it's not a very high priority).
>

Switching is fine if you want, but the existing tester does (or at least
it did) have a mode where it uses a low-level socket instead of
HttpURLConnection, and therefore doesn't give you the useless garbage on a
500.  The trick is to set the "protocol" property to "HTTP/1.0" instead of
an empty string.

> Comments ?
>
> Remy
>

Craig

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: [5.0] Optimizing the core a bit more

Posted by Remy Maucherat <re...@apache.org>.
Remy Maucherat wrote:
> In an effort to tweak the core a bit more to simplify things:
> 
> - Remove ContainerBase.invoke: A Container always has a Pipeline 
> associated with it; as such, the Container interface should have a 
> getPipeline method, and this should be called instead. This will reduce 
> a bit the call stack.
> 
> - I noticed the RequestListenerValve was added twice to the pipeline 
> (using the tester). This doesn't seem right, obviously.

Actually, since it is a needed feature for spec compliance, and to 
simplify things a little, it should be in "core", and I'll integrate the 
code in StandardContextValve.

Similarly, the code in the ErrorDispatcherValve should be integrated in 
StandardHostValve.

OTOH, the ErrorReportValve should stay as is as a Valve, as it is not 
required for spec compliance, and it is valid to remove or replace it.

Comments ?

Remy



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


[5.0] Optimizing the core a bit more

Posted by Remy Maucherat <re...@apache.org>.
In an effort to tweak the core a bit more to simplify things:

- Remove ContainerBase.invoke: A Container always has a Pipeline 
associated with it; as such, the Container interface should have a 
getPipeline method, and this should be called instead. This will reduce 
a bit the call stack.

- I noticed the RequestListenerValve was added twice to the pipeline 
(using the tester). This doesn't seem right, obviously.

- The RequestListenerValve builds the list of the listeners it must 
notify dynamically, on each request (twice for each request = lots of 
useless instanceof). This should IMO be done statically in start (with 
the array of listeners being cleared on stop).

Remy


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: [5.0] Tester

Posted by Remy Maucherat <re...@apache.org>.
Costin Manolache wrote:
> What about "anteater" ? 

(yet another project I didn't know about)
The sad truth is that I'm lazy :)

I want to rewrite the minimum possible amount of code and fix the tests 
which can't work with the JDK's HTTP client (ex: it returns 500 - TC 5 
now restores the original error code; neat - but I still want to read 
the entity body; the JDK then throws an exception to inform me I'm 
stupid to attempt to do that; thanks Sun) :)

Remy



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: Bug in JkMX.java

Posted by Davanum Srinivas <di...@yahoo.com>.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21714

--- Davanum Srinivas <di...@yahoo.com> wrote:
> Do you want me to create a bugzilla report? here's the diff. Need to check for the whole class
> ("mx4j.adaptor.http.HttpAdaptor")
> 
> Thanks,
> dims
> 
> Index: JkMX.java
> ===================================================================
> RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/JkMX.java,v
> retrieving revision 1.12
> diff -d -u -b -B -w -u -r1.12 JkMX.java
> --- JkMX.java   2 Jun 2003 01:22:32 -0000       1.12
> +++ JkMX.java   18 Jul 2003 15:24:29 -0000
> @@ -112,7 +112,7 @@
>      public void loadAdapter() throws IOException {
>          boolean adapterLoaded = false;
> 
> -        if (classExists("mx4j.adaptor.http")) {
> +        if (classExists("mx4j.adaptor.http.HttpAdaptor")) {
>              try {
>                  serverName = new ObjectName("Http:name=HttpAdaptor");
>                  mserver.createMBean("mx4j.adaptor.http.HttpAdaptor", serverName, null);
> 
> 
> =====
> Davanum Srinivas - http://webservices.apache.org/~dims/
> 
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.
> http://search.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> 


=====
Davanum Srinivas - http://webservices.apache.org/~dims/

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Bug in JkMX.java

Posted by Davanum Srinivas <di...@yahoo.com>.
Do you want me to create a bugzilla report? here's the diff. Need to check for the whole class
("mx4j.adaptor.http.HttpAdaptor")

Thanks,
dims

Index: JkMX.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/JkMX.java,v
retrieving revision 1.12
diff -d -u -b -B -w -u -r1.12 JkMX.java
--- JkMX.java   2 Jun 2003 01:22:32 -0000       1.12
+++ JkMX.java   18 Jul 2003 15:24:29 -0000
@@ -112,7 +112,7 @@
     public void loadAdapter() throws IOException {
         boolean adapterLoaded = false;

-        if (classExists("mx4j.adaptor.http")) {
+        if (classExists("mx4j.adaptor.http.HttpAdaptor")) {
             try {
                 serverName = new ObjectName("Http:name=HttpAdaptor");
                 mserver.createMBean("mx4j.adaptor.http.HttpAdaptor", serverName, null);


=====
Davanum Srinivas - http://webservices.apache.org/~dims/

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: [5.0] Tester

Posted by Costin Manolache <cm...@yahoo.com>.
What about "anteater" ? 

Costin


Tim Funk wrote:

> Is there any chance we'd want to use Latka instead? (Which uses
> HttpClient)
> 
> -Tim
> 
> Remy Maucherat wrote:
>> I have put the tester back in activity for TC 5 (and it caught the
>> failure for error pages), but unfortunately there are a few limitations
>> caused by the HTTP client used (for example, if the status is 500, you
>> can't read the content). It would be a good idea IMO to switch to
>> commons-httpclient (which I'll do, but it's not a very high priority).
>> 
>> Comments ?
>> 
>> Remy
>>



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: [5.0] Tester

Posted by Tim Funk <fu...@joedog.org>.
I don't have much experience using Latka either but it used HttpClient and 
appeared to use an xml config file for all the tests. It also has the ability 
to add your own condition classes too.

But it does appear dormant in commons. :(

+1 to using just HttpClient

-Tim

Remy Maucherat wrote:
> Tim Funk wrote:
> 
>> Is there any chance we'd want to use Latka instead? (Which uses 
>> HttpClient)
> 
> 
> Well, I don't know that component ;-)
> There's an apparent problem with it, though: it's an alpha 1 release, 
> and doesn't seem to be evolving anymore (last release in 2001, so it's 
> likely not in sync with HttpClient). Any other ideas ?
> 
> I think the safest bet would be to adapt the TestClient class to use 
> HttpClient 2.0 b2.
> 
> Remy


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: [5.0] Tester

Posted by Remy Maucherat <re...@apache.org>.
Tim Funk wrote:
> Is there any chance we'd want to use Latka instead? (Which uses HttpClient)

Well, I don't know that component ;-)
There's an apparent problem with it, though: it's an alpha 1 release, 
and doesn't seem to be evolving anymore (last release in 2001, so it's 
likely not in sync with HttpClient). Any other ideas ?

I think the safest bet would be to adapt the TestClient class to use 
HttpClient 2.0 b2.

Remy


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: [5.0] Tester

Posted by Tim Funk <fu...@joedog.org>.
Is there any chance we'd want to use Latka instead? (Which uses HttpClient)

-Tim

Remy Maucherat wrote:
> I have put the tester back in activity for TC 5 (and it caught the 
> failure for error pages), but unfortunately there are a few limitations 
> caused by the HTTP client used (for example, if the status is 500, you 
> can't read the content). It would be a good idea IMO to switch to 
> commons-httpclient (which I'll do, but it's not a very high priority).
> 
> Comments ?
> 
> Remy
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: [VOTE] 4.1.26 stability rating

Posted by Renato <re...@yahoo.com>.
[ ] Alpha
[ ] Beta
[X] Stable

So far, it's running ok.

Renato

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: [VOTE] 4.1.26 stability rating

Posted by Remy Maucherat <re...@apache.org>.
>>[ ] Alpha
>>[ ] Beta
>>[X] Stable

Remy


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: [VOTE] 4.1.26 stability rating

Posted by Bill Barker <wb...@wilshire.com>.
----- Original Message -----
From: "Remy Maucherat" <re...@apache.org>
To: "Tomcat Developers List" <to...@jakarta.apache.org>
Sent: Friday, July 18, 2003 2:51 AM
Subject: [VOTE] 4.1.26 stability rating


> [ ] Alpha
> [ ] Beta
> [X] Stable
>
> I hope people had enough time to test this build (and thanks for voting)
:)
>
> Remy
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>


Re: [VOTE] 4.1.26 stability rating

Posted by Jean-Francois Arcand <jf...@apache.org>.
Finaly...

Remy Maucherat wrote:

> [ ] Alpha
> [ ] Beta
> [X] Stable 


-- Jeanfrancois


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


[VOTE] 4.1.26 stability rating

Posted by Remy Maucherat <re...@apache.org>.
[ ] Alpha
[ ] Beta
[ ] Stable

I hope people had enough time to test this build (and thanks for voting) :)

Remy



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org