svn commit: r550789 - /tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c

2007-06-26 Thread mturk
Author: mturk
Date: Tue Jun 26 05:28:00 2007
New Revision: 550789

URL: http://svn.apache.org/viewvc?view=rev&rev=550789
Log:
Do not pass session id if it is zero length. For now only log those attempts. 
We should consider returning 400 if the jsessionid is empty perhaps.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c

Modified: tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c?view=diff&rev=550789&r1=550788&r2=550789
==
--- tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c Tue Jun 26 05:28:00 
2007
@@ -390,13 +390,22 @@
 /* Retrieve session id from the cookie or the parameter
  * (parameter first)
  */
-static char *get_sessionid(jk_ws_service_t *s)
+static char *get_sessionid(jk_ws_service_t *s, jk_logger_t *l)
 {
 char *val;
 val = get_path_param(s, JK_PATH_SESSION_IDENTIFIER);
 if (!val) {
 val = get_cookie(s, JK_SESSION_IDENTIFIER);
 }
+if (val && !*val) {
+/* TODO: For now only log the empty sessions.
+ *   However we should probably return 400
+ *   (BAD_REQUEST) in this case
+ */
+jk_log(l, JK_LOG_INFO,
+   "Detected empty session identifier.");
+return NULL;
+}
 return val;
 }
 
@@ -913,7 +922,7 @@
 /* Use sessionid only if sticky_session is
  * defined for this load balancer
  */
-sessionid = get_sessionid(s);
+sessionid = get_sessionid(s, l);
 }
 if (JK_IS_DEBUG_LEVEL(l))
 jk_log(l, JK_LOG_DEBUG,



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: svn commit: r550789 - /tomcat/connectors/trunk/jk/native/common/jk_lb_worker.c

2007-06-26 Thread Remy Maucherat

[EMAIL PROTECTED] wrote:

Author: mturk
Date: Tue Jun 26 05:28:00 2007
New Revision: 550789

URL: http://svn.apache.org/viewvc?view=rev&rev=550789
Log:
Do not pass session id if it is zero length. For now only log those attempts. 
We should consider returning 400 if the jsessionid is empty perhaps.


This serves no useful purpose. What if jsessionid is one char long 
(let's say ' ') ? Is it more valid ?


Rémy

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 42743] New: - Command Prompt Display Error

2007-06-26 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42743

   Summary: Command Prompt Display Error
   Product: Tomcat 5
   Version: 5.0.18
  Platform: PC
OS/Version: Windows 2000
Status: UNCONFIRMED
  Keywords: RFC
  Severity: normal
  Priority: P4
 Component: Unknown
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


When i try to stop Tomcat5.0.18, on command prompt it displays message 
as "stoping protocol" rather it should be "stopping protocol".

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 42743] - Command Prompt Display Error

2007-06-26 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42743


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 42744] New: - ResourceCache.allocate call hangs the server

2007-06-26 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42744

   Summary: ResourceCache.allocate call hangs the server
   Product: Tomcat 5
   Version: 5.5.0
  Platform: PC
OS/Version: Windows Server 2003
Status: NEW
  Severity: major
  Priority: P2
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Our server hangs during ResourceCache allocation roughly once a week. The
consequence is that all HTTP threads go into BLOCKED state waiting for the
allocations to finish, which never happens. Strangely enough, the hang occurs
during a native method call:

Name: http-0.0.0.0-8080-2
State: RUNNABLE
Total blocked: 400,211  Total waited: 2,487

Stack trace: 
java.lang.StrictMath.floor(Native Method)
java.lang.Math.floor(Math.java:407)
org.apache.naming.resources.ResourceCache.allocate(ResourceCache.java:233)
org.apache.naming.resources.ProxyDirContext.cacheLoad(ProxyDirContext.java:1599)
org.apache.naming.resources.ProxyDirContext.cacheLookup(ProxyDirContext.java:1448)
org.apache.naming.resources.ProxyDirContext.lookupCache(ProxyDirContext.java:1376)
org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:663)
org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:335)
javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
java.lang.Thread.run(Thread.java:595)

and we then have several hundred cache-related requests (based on the threads
reserved for Tomcat) blocked, all waiting for the thread above:

Name: http-0.0.0.0-8080-3
State: BLOCKED on [EMAIL PROTECTED] owned by:
http-0.0.0.0-8080-2
Total blocked: 470,313  Total waited: 2,755

Stack trace: 
org.apache.naming.resources.ProxyDirContext.cacheLoad(ProxyDirContext.java:1599)
org.apache.naming.resources.ProxyDirContext.cacheLookup(ProxyDirContext.java:1448)
org.apache.naming.resources.ProxyDirContext.lookup(ProxyDirContext.java:282)
org.apache.tomcat.util.http.mapper.Mapper.internalMapWrapper(Mapper.java:778)
org.apache.tomcat.util.http.mapper.Mapper.internalMap(Mapper.java:622)
org.apache.tomcat.util.http.mapper.Mapper.map(Mapper.java:512)
org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:262)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:146)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
java.lang.Thread.run(Thread.java:595)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 42744] - ResourceCache.allocate call hangs the server

2007-06-26 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42744





--- Additional Comments From [EMAIL PROTECTED]  2007-06-26 08:39 ---
This is most likely a JDK bug with the StrictMath package, as the dead lock is a
result of the StrictMath.floor method never returning.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[VOTE] Release build 5.5.24

2007-06-26 Thread Filip Hanik - Dev Lists
Candidate binaries are available here: 
http://people.apache.org/~fhanik/tomcat/tomcat-5.5/v5.5.24/


According to the (slightly) updated release process, the 5.5.24 tag is:
[ ] Broken
[ ] Alpha
[ ] Beta
[ ] Stable


Filip

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 42747] New: - Context className attribute ignored for contexts deployed from descriptors in web/META-INF/context.xml

2007-06-26 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42747

   Summary: Context className attribute ignored for contexts
deployed from descriptors in web/META-INF/context.xml
   Product: Tomcat 6
   Version: 6.0.11
  Platform: All
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


When deploying an app from a context descriptor inside a webapp/META-INF
directory via context.xml, the className is ignored and the context is created
as a StandardContext.  I've tried to use a ReplicatedContext class in a cluster
from this configuration and it does not work.  However, it does work if i move
the context.xml to $CATALINA_BASE/conf/[EngineName]/[HostName]/webapp.xml.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



SIP Support in Tomcat

2007-06-26 Thread Jean Deruelle

Hello all,

I'm interested in adding sip support to Tomcat and I wanted to know if
anyone already started work on this topic.
The ultimate goal is to have tomcat compliant with the sip servlet
specification.

I have currently a new connector supporting the sip procotol through a
SipProtocolHandler class implementing the ProtocolHandler class that starts
and stop the sip stack.
I'll start to add sar (sip servlet archive) deployments in creating a new
Host class.
Is anyone on the team interested in such work ?
Where can I ask, in the future, tomcat related architecture questions so
that I can best implement the sip protocol within tomcat ?
I started the work on tomcat 5.5 .

Thanks
Best regards,
Jean Deruelle


Re: SIP Support in Tomcat

2007-06-26 Thread Filip Hanik - Dev Lists
don't believe any effort has been started. so we definitely would like 
to see your contributions


Filip

Jean Deruelle wrote:

Hello all,

I'm interested in adding sip support to Tomcat and I wanted to know if
anyone already started work on this topic.
The ultimate goal is to have tomcat compliant with the sip servlet
specification.

I have currently a new connector supporting the sip procotol through a
SipProtocolHandler class implementing the ProtocolHandler class that 
starts

and stop the sip stack.
I'll start to add sar (sip servlet archive) deployments in creating a new
Host class.
Is anyone on the team interested in such work ?
Where can I ask, in the future, tomcat related architecture questions so
that I can best implement the sip protocol within tomcat ?
I started the work on tomcat 5.5 .

Thanks
Best regards,
Jean Deruelle



No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.476 / Virus Database: 269.9.9/870 - Release Date: 6/26/2007 10:07 AM
  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 42750] New: - Http Post requests not handled correctly if there is more than one space between the "POST" and the URL

2007-06-26 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42750

   Summary: Http Post requests not handled correctly if there is
more than one space between the "POST" and the URL
   Product: Tomcat 5
   Version: 5.5.20
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: normal
  Priority: P3
 Component: Connector:Coyote
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


When a Tomcat based Http listener receives a Soap request with more than one 
space between the "POST" command and the URL, this error response is returned 
by Tomcat version 5.5.20, and there is no response at all from other versions 
(4.0.2 and 5.0):

HTTP/1.1 505 HTTP Version Not Supported
Server: Apache-Coyote/1.1
Date: Fri, 08 Jun 2007 22:19:07 GMT
Connection: close

Here is what I mean about there being more than one space between the Post and 
the URL.  In the examples below I leave out the body of the Soap request for 
simplification.  I used the TCPMonitor supplied by the Apache project to 
capture a Soap request and here is how it is displayed in the monitor (it 
probably looks completely different on the wire):

POSThttp://C010030S:5599/NXAServer/NextAxiomServer HTTP/1.0

User-Agent: Natural 4.2
Content-Type: text/xml; charset=utf-8
SOAPAction: urn:rpc?path=Training.webMethods.validateUserid
Content-Length: 338

Note the four spaces between the "POST" and the URL in the first line.  Now 
here is what the request looks like after removing three of the four spaces:

POST http://C010030S:5599/NXAServer/NextAxiomServer HTTP/1.0
User-Agent: Natural 4.2
Content-Type: text/xml; charset=utf-8
SOAPAction: urn:rpc?path=Training.webMethods.validateUserid
Content-Length: 338

The request seems to only get handled correctly by the Tomcat HTTP listener 
when there is one space between the "Post" and the URL.  

This example is from a Soap request issued by a Natural program running on a 
Z/OS mainframe.  Instead of sending you a complete example to recreate the 
problem (which would require a mainframe) it would probably be easy to use the 
Apache TCP Monitor to capture a Soap request from an available test system and 
then add one of more spaces between the Post and the URL, resend the request 
in the monitor and see what happens.  

What I'm trying to do is invoke from Natural on a mainframe (which 
unfortunately we have no control over) a web service running on webMethods 
(IntegrationServer version 6.1 which uses Tomcat402B.jar, so that may be 
version 4.0.2B (?), and JVM 1.4.2_13). No response is returned at all from 
that version.  I then tried to do the same thing with webMethods version 6.5 
(which uses Tomcat 5.0 and JVM 1.4.2_07) and still got no response.  Then I 
tried NextAxiom version 6.5.2.0 (which uses Tomcat version 5.5.20) and I at 
least got a response from it (see the response at the top of this 
description).  I then tried invoking web services that use other Http 
listeners and found the two I tried handled the Soap request just fine.  One 
example is IBM HTTP Server (version 1.3.8) that is running on a WebSphere 
server; it handles the request with more than one space just fine (by "fine" I 
mean it recognized the URL and handed it off to the process at that URL).  The 
other I don't know much about; it was just some remote web service I found on 
the web (http://www.webserviceX.NET).

I have looked through the Apache Tomcat website, documentation and an 
associate looked through the bug database for version 5, and we can't find 
anything that addresses this problem.  I downloaded the source code, but got 
lost looking around and decided to ask for some help to find and fix this 
problem.  Or maybe someone has an idea on how to configure the Http listener 
to handle this better.

If this is a bug, I would be more than happy to attempt to fix this myself if 
someone could point me in the right direction.

Thank you very very much for your time and efforts.

Dick Salisbury
Idaho Power Company
[EMAIL PROTECTED]

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 42750] - Http Post requests not handled correctly if there is more than one space between the "POST" and the URL

2007-06-26 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42750





--- Additional Comments From [EMAIL PROTECTED]  2007-06-26 17:56 ---
According to the HTTP spec there is one space character between the method and
the URL - i.e. your request is invalid HTTP.
http://tools.ietf.org/html/rfc1945#page-23

This ticket should probably be marked INVALID, but the error response doesn't
look appropriate - the response should probably be a 400 Bad Request.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]