svn commit: r521737 - /tomcat/build/tags/tc5.5.x/TOMCAT_5_5_23/sign.bat

2007-03-23 Thread fhanik
Author: fhanik
Date: Fri Mar 23 07:26:11 2007
New Revision: 521737

URL: http://svn.apache.org/viewvc?view=rev&rev=521737
Log:
sign exe's of course

Modified:
tomcat/build/tags/tc5.5.x/TOMCAT_5_5_23/sign.bat

Modified: tomcat/build/tags/tc5.5.x/TOMCAT_5_5_23/sign.bat
URL: 
http://svn.apache.org/viewvc/tomcat/build/tags/tc5.5.x/TOMCAT_5_5_23/sign.bat?view=diff&rev=521737&r1=521736&r2=521737
==
--- tomcat/build/tags/tc5.5.x/TOMCAT_5_5_23/sign.bat (original)
+++ tomcat/build/tags/tc5.5.x/TOMCAT_5_5_23/sign.bat Fri Mar 23 07:26:11 2007
@@ -15,3 +15,7 @@
   echo Signing %%i
   echo %1|gpg --passphrase-fd 0 -a -b %%i 
 )
+FOR /R %cd%\release\v5.5.23 %%i in (*.exe) do (
+  echo Signing %%i
+  echo %1|gpg --passphrase-fd 0 -a -b %%i
+)



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



svn commit: r521765 - in /tomcat/tc6.0.x/trunk/java/org/apache: coyote/http11/Http11NioProcessor.java tomcat/util/net/NioEndpoint.java

2007-03-23 Thread fhanik
Author: fhanik
Date: Fri Mar 23 08:28:39 2007
New Revision: 521765

URL: http://svn.apache.org/viewvc?view=rev&rev=521765
Log:
Optimized sendfile a tiny bit. Instead of handing off to the poller, since we 
are already on a thread then try it first on, and if we are not done, then 
simply register with the poller

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java?view=diff&rev=521765&r1=521764&r2=521765
==
--- tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java 
Fri Mar 23 08:28:39 2007
@@ -936,8 +936,9 @@
 KeyAttachment ka = (KeyAttachment)socket.getAttachment(false);
 ka.setSendfileData(sendfileData);
 sendfileData.keepAlive = keepAlive;
-endpoint.getPoller0().add(socket,SelectionKey.OP_WRITE);
-openSocket = true;
+SelectionKey key = 
socket.getIOChannel().keyFor(socket.getPoller().getSelector());
+//do the first write on this thread, might as well
+openSocket = socket.getPoller().processSendfile(key,ka,true);
 break;
 }
 

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?view=diff&rev=521765&r1=521764&r2=521765
==
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Fri 
Mar 23 08:28:39 2007
@@ -1406,7 +1406,7 @@
 NioChannel channel = attachment.getChannel();
 if (sk.isReadable() || sk.isWritable() ) {
 if ( attachment.getSendfileData() != null ) {
-processSendfile(sk,attachment);
+processSendfile(sk,attachment,true);
 } else if ( attachment.getComet() ) {
 //check if thread is available
 if ( isWorkerAvailable() ) {
@@ -1451,7 +1451,7 @@
 return result;
 }
 
-protected void processSendfile(SelectionKey sk, KeyAttachment 
attachment) {
+public boolean processSendfile(SelectionKey sk, KeyAttachment 
attachment, boolean reg) {
 try {
 //unreg(sk,attachment);//only do this if we do process send 
file on a separate thread
 SendfileData sd = attachment.getSendfileData();
@@ -1459,7 +1459,7 @@
 File f = new File(sd.fileName);
 if ( !f.exists() ) {
 cancelledKey(sk,SocketStatus.ERROR,false);
-return;
+return false;
 }
 sd.fchannel = new FileInputStream(f).getChannel();
 }
@@ -1472,17 +1472,23 @@
 if ( sd.length <= 0 ) {
 attachment.setSendfileData(null);
 if ( sd.keepAlive ) 
-reg(sk,attachment,SelectionKey.OP_READ);
+if (reg) reg(sk,attachment,SelectionKey.OP_READ);
 else 
 cancelledKey(sk,SocketStatus.STOP,false);
+} else if ( attachment.interestOps() == 0 && reg ) {
+reg(sk,attachment,SelectionKey.OP_WRITE);
 }
 }catch ( IOException x ) {
-if ( log.isDebugEnabled() ) log.warn("Unable to complete send 
file", x);
+if ( log.isDebugEnabled() ) log.warn("Unable to complete 
sendfile request:", x);
+else log.warn("Unable to complete sendfile 
request:"+x.getMessage());
 cancelledKey(sk,SocketStatus.ERROR,false);
+return false;
 }catch ( Throwable t ) {
 log.error("",t);
 cancelledKey(sk, SocketStatus.ERROR, false);
+return false;
 }
+return true;
 }
 
 protected void unreg(SelectionKey sk, KeyAttachment attachment) {



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



svn commit: r521770 - in /tomcat/connectors/trunk/jk: native/common/jk_ajp_common.c native/common/jk_ajp_common.h native/common/jk_map.c native/common/jk_map.h native/common/jk_util.c native/common/jk

2007-03-23 Thread mturk
Author: mturk
Date: Fri Mar 23 08:35:18 2007
New Revision: 521770

URL: http://svn.apache.org/viewvc?view=rev&rev=521770
Log:
Allow multiple status codes for fail_on_status directive.

Modified:
tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
tomcat/connectors/trunk/jk/native/common/jk_ajp_common.h
tomcat/connectors/trunk/jk/native/common/jk_map.c
tomcat/connectors/trunk/jk/native/common/jk_map.h
tomcat/connectors/trunk/jk/native/common/jk_util.c
tomcat/connectors/trunk/jk/native/common/jk_util.h
tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml

Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c?view=diff&rev=521770&r1=521769&r2=521770
==
--- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Fri Mar 23 
08:35:18 2007
@@ -1443,7 +1443,7 @@
 if (r->flush)
 r->flush(r);
 }
-else {
+else {
 if (!r->write(r, msg->buf + msg->pos, len)) {
 jk_log(l, JK_LOG_INFO,
"Writing to client aborted or client network 
problems");
@@ -1526,6 +1526,17 @@
 return JK_AJP13_NO_RESPONSE;
 }
 
+static int is_http_status_fail(ajp_worker_t *w, int status)
+{
+unsigned int i;
+for (i = 0; i < w->http_status_fail_num; i++) {
+if (w->http_status_fail[i] == status)
+return 1;
+}
+return 0;
+}
+
+
 /*
  * get replies from Tomcat via Ajp13/Ajp14
  * We will know only at read time if the remote host closed
@@ -1641,8 +1652,7 @@
 return JK_TRUE;
 }
 else if (JK_AJP13_SEND_HEADERS == rc) {
-if (p->worker->http_status_fail &&
-(p->worker->http_status_fail == s->http_response_status)) {
+if (is_http_status_fail(p->worker, s->http_response_status)) {
 JK_TRACE_EXIT(l);
 return JK_STATUS_ERROR;
 }
@@ -1868,7 +1878,7 @@
"because of response status %d, "
"recoverable operation attempt=%d",
p->worker->name,
-   p->worker->http_status_fail, i);
+   s->http_response_status, i);
 JK_TRACE_EXIT(l);
 if (i >= JK_RETRIES) {
 jk_sleep(JK_SLEEP_DEF);
@@ -2096,7 +2106,10 @@
 p->max_packet_size =
 jk_get_max_packet_size(props, p->name);
 
-p->http_status_fail = jk_get_worker_fail_on_status(props, p->name);
+p->http_status_fail_num = jk_get_worker_fail_on_status(props, p->name,
+ &p->http_status_fail[0],
+ JK_MAX_HTTP_STATUS_FAILS);
+
 
 pThis->retries =
 jk_get_worker_retries(props, p->name,
@@ -2237,7 +2250,7 @@
 int i;
 jk_sock_t sock = JK_INVALID_SOCKET;
 
-/* If we are going to close the connection, then park the socket 
so 
+/* If we are going to close the connection, then park the socket so
we can shut it down nicely rather than letting 
ajp_reset_endpoint kill it */
 if (IS_VALID_SOCKET(p->sd) && !p->reuse) {
 if (JK_IS_DEBUG_LEVEL(l))

Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.h
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.h?view=diff&rev=521770&r1=521769&r2=521770
==
--- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.h Fri Mar 23 
08:35:18 2007
@@ -201,7 +201,7 @@
 #define RECOVER_ABORT_IF_TCSENDHEADER0x0002 /* DONT RECOVER IF TOMCAT FAIL 
AFTER SENDING HEADERS */
 #define RECOVER_ABORT_IF_CLIENTERROR 0x0004 /* CLOSE THE SOCKET IN CASE OF 
CLIENT ERROR */
 
-
+#define JK_MAX_HTTP_STATUS_FAILS   32   /* Should be enough for most 400 and 
500 statuses */
 
 struct jk_res_data
 {
@@ -291,7 +291,8 @@
 /* 
  * HTTP status that will cause failover (0 means disabled)
  */
- int http_status_fail;
+ unsigned int http_status_fail_num;
+ int http_status_fail[JK_MAX_HTTP_STATUS_FAILS];
 };
 
 

Modified: tomcat/connectors/trunk/jk/native/common/jk_map.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_map.c?view=diff&rev=521770&r1=521769&r2=521770
==
--- tomcat/connectors/trunk/jk/native/common/jk_map.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_map.c Fri Mar 23 08:35:18 2007
@@ -244,7 +244,7 @@
 
 char **jk_map_g

svn commit: r521774 - /tomcat/connectors/trunk/jk/xdocs/reference/workers.xml

2007-03-23 Thread mturk
Author: mturk
Date: Fri Mar 23 08:39:09 2007
New Revision: 521774

URL: http://svn.apache.org/viewvc?view=rev&rev=521774
Log:
Document multiple fail_on_status codes for 1.2.22+

Modified:
tomcat/connectors/trunk/jk/xdocs/reference/workers.xml

Modified: tomcat/connectors/trunk/jk/xdocs/reference/workers.xml
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/reference/workers.xml?view=diff&rev=521774&r1=521773&r2=521774
==
--- tomcat/connectors/trunk/jk/xdocs/reference/workers.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/reference/workers.xml Fri Mar 23 08:39:09 
2007
@@ -728,6 +728,11 @@
 
 This feature has been added in jk 1.2.20.
 
+
+Starting with jk 1.2.22 it is possible to define multiple
+status codes separated by space or coma characters.
+For example: worker.xxx.fail_on_status=500,503
+
 
 
 



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



svn commit: r521784 - /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

2007-03-23 Thread fhanik
Author: fhanik
Date: Fri Mar 23 09:05:46 2007
New Revision: 521784

URL: http://svn.apache.org/viewvc?view=rev&rev=521784
Log:
big oopsie, forgot to do SSL for executor/socketprocessor

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?view=diff&rev=521784&r1=521783&r2=521784
==
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Fri 
Mar 23 09:05:46 2007
@@ -846,8 +846,8 @@
 }
 
 public boolean getUseSendfile() {
-
-return useSendfile;
+//send file doesn't work with SSL
+return useSendfile && (!isSSLEnabled());
 }
 
 /**
@@ -1956,18 +1956,50 @@
  
 public void run() {
 
-// Process the request from this socket
-boolean closed = 
(status==null)?(handler.process(socket)==Handler.SocketState.CLOSED) :
-
(handler.event(socket,status)==Handler.SocketState.CLOSED);
-if (closed) {
-// Close socket and pool
-try {
-try {socket.close();}catch (Exception ignore){}
-if ( socket.isOpen() ) socket.close(true);
-} catch ( Exception x ) {
-log.error("",x);
-}
+   
+SelectionKey key = 
socket.getIOChannel().keyFor(socket.getPoller().getSelector());
+int handshake = -1;
+try {
+handshake = socket.handshake(key.isReadable(), 
key.isWritable());
+}catch ( IOException x ) {
+handshake = -1;
+if ( log.isDebugEnabled() ) log.debug("Error during SSL 
handshake",x);
+}catch ( CancelledKeyException ckx ) {
+handshake = -1;
+}
+if ( handshake == 0 ) {
+// Process the request from this socket
+// Process the request from this socket
+boolean closed = 
(status==null)?(handler.process(socket)==Handler.SocketState.CLOSED) :
+(handler.event(socket,status)==Handler.SocketState.CLOSED);
+
+if (closed) {
+// Close socket and pool
+try {
+KeyAttachment att = 
(KeyAttachment)socket.getAttachment(true);
+try {socket.close();}catch (Exception ignore){}
+if ( socket.isOpen() ) socket.close(true);
+key.cancel();
+key.attach(null);
+nioChannels.offer(socket);
+if ( att!=null ) keyCache.offer(att);
+}catch ( Exception x ) {
+log.error("",x);
+}
+} 
+} else if (handshake == -1 ) {
+KeyAttachment ka = (KeyAttachment)key.attachment();
+
socket.getPoller().cancelledKey(key,SocketStatus.DISCONNECT,false);
+try {socket.close(true);}catch (IOException ignore){}
+nioChannels.offer(socket);
+if ( ka!=null ) keyCache.offer(ka);
+} else {
+final SelectionKey fk = key;
+final int intops = handshake;
+final KeyAttachment ka = (KeyAttachment)fk.attachment();
+ka.getPoller().add(socket,intops);
 }
+
 socket = null;
 status = null;
 //return to cache



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



svn commit: r521787 - /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

2007-03-23 Thread fhanik
Author: fhanik
Date: Fri Mar 23 09:12:09 2007
New Revision: 521787

URL: http://svn.apache.org/viewvc?view=rev&rev=521787
Log:
choke the log statement, not needed

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?view=diff&rev=521787&r1=521786&r2=521787
==
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Fri 
Mar 23 09:12:09 2007
@@ -1480,7 +1480,6 @@
 }
 }catch ( IOException x ) {
 if ( log.isDebugEnabled() ) log.warn("Unable to complete 
sendfile request:", x);
-else log.warn("Unable to complete sendfile 
request:"+x.getMessage());
 cancelledKey(sk,SocketStatus.ERROR,false);
 return false;
 }catch ( Throwable t ) {
@@ -1968,7 +1967,6 @@
 handshake = -1;
 }
 if ( handshake == 0 ) {
-// Process the request from this socket
 // Process the request from this socket
 boolean closed = 
(status==null)?(handler.process(socket)==Handler.SocketState.CLOSED) :
 (handler.event(socket,status)==Handler.SocketState.CLOSED);



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



svn commit: r521790 - in /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net: NioBlockingSelector.java NioEndpoint.java

2007-03-23 Thread fhanik
Author: fhanik
Date: Fri Mar 23 09:19:47 2007
New Revision: 521790

URL: http://svn.apache.org/viewvc?view=rev&rev=521790
Log:
better error handling

Modified:

tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java?view=diff&rev=521790&r1=521789&r2=521790
==
--- 
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java 
(original)
+++ 
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java 
Fri Mar 23 09:19:47 2007
@@ -62,7 +62,7 @@
 continue; //we successfully wrote, try again without a 
selector
 }
 }
-
+if ( key == null ) throw new IOException("Key no longer 
registered");
 KeyAttachment att = (KeyAttachment) key.attachment();
 try {
 if ( att.getLatch()==null || att.getLatch().getCount()==0) 
att.startLatch(1);

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?view=diff&rev=521790&r1=521789&r2=521790
==
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Fri 
Mar 23 09:19:47 2007
@@ -1311,6 +1311,7 @@
 }
 public void cancelledKey(SelectionKey key, SocketStatus status, 
boolean dispatch) {
 try {
+if ( key == null ) return;//nothing to do
 KeyAttachment ka = (KeyAttachment) key.attachment();
 if (ka != null && ka.getComet()) {
 //the comet event takes care of clean up
@@ -1954,54 +1955,60 @@
 }
  
 public void run() {
-
-   
-SelectionKey key = 
socket.getIOChannel().keyFor(socket.getPoller().getSelector());
-int handshake = -1;
+SelectionKey key = null;
 try {
-handshake = socket.handshake(key.isReadable(), 
key.isWritable());
-}catch ( IOException x ) {
-handshake = -1;
-if ( log.isDebugEnabled() ) log.debug("Error during SSL 
handshake",x);
-}catch ( CancelledKeyException ckx ) {
-handshake = -1;
-}
-if ( handshake == 0 ) {
-// Process the request from this socket
-boolean closed = 
(status==null)?(handler.process(socket)==Handler.SocketState.CLOSED) :
-(handler.event(socket,status)==Handler.SocketState.CLOSED);
+key = 
socket.getIOChannel().keyFor(socket.getPoller().getSelector());
+int handshake = -1;
+try {
+handshake = socket.handshake(key.isReadable(), 
key.isWritable());
+}catch ( IOException x ) {
+handshake = -1;
+if ( log.isDebugEnabled() ) log.debug("Error during SSL 
handshake",x);
+}catch ( CancelledKeyException ckx ) {
+handshake = -1;
+}
+if ( handshake == 0 ) {
+// Process the request from this socket
+boolean closed = 
(status==null)?(handler.process(socket)==Handler.SocketState.CLOSED) :
+
(handler.event(socket,status)==Handler.SocketState.CLOSED);
 
-if (closed) {
-// Close socket and pool
-try {
-KeyAttachment att = 
(KeyAttachment)socket.getAttachment(true);
-try {socket.close();}catch (Exception ignore){}
-if ( socket.isOpen() ) socket.close(true);
-key.cancel();
-key.attach(null);
-nioChannels.offer(socket);
-if ( att!=null ) keyCache.offer(att);
-}catch ( Exception x ) {
-log.error("",x);
-}
-} 
-} else if (handshake == -1 ) {
-KeyAttachment ka = (KeyAttachment)key.attachment();
-
socket.getPoller().cancelledKey(key,SocketStatus.DISCONNECT,false);
-try {socket.close(true);}catch (IOException ignore){}
-nioChannels.offer(socket);
-if ( ka!=null ) keyCache.offer(ka);
-} else {
-final SelectionKey fk = key;
-

Re: svn commit: r521787 - /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

2007-03-23 Thread Peter Rossbach

Hi Filip,

why you log a warn message and control it with debug level?

Peter


Am 23.03.2007 um 17:12 schrieb [EMAIL PROTECTED]:


Author: fhanik
Date: Fri Mar 23 09:12:09 2007
New Revision: 521787

URL: http://svn.apache.org/viewvc?view=rev&rev=521787
Log:
choke the log statement, not needed

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/ 
NioEndpoint.java


Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/ 
NioEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/ 
apache/tomcat/util/net/NioEndpoint.java? 
view=diff&rev=521787&r1=521786&r2=521787
== 

--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/ 
NioEndpoint.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/ 
NioEndpoint.java Fri Mar 23 09:12:09 2007

@@ -1480,7 +1480,6 @@
 }
 }catch ( IOException x ) {
 if ( log.isDebugEnabled() ) log.warn("Unable to  
complete sendfile request:", x);
-else log.warn("Unable to complete sendfile  
request:"+x.getMessage());

 cancelledKey(sk,SocketStatus.ERROR,false);
 return false;
 }catch ( Throwable t ) {
@@ -1968,7 +1967,6 @@
 handshake = -1;
 }
 if ( handshake == 0 ) {
-// Process the request from this socket
 // Process the request from this socket
 boolean closed = (status==null)?(handler.process 
(socket)==Handler.SocketState.CLOSED) :
 (handler.event(socket,status) 
==Handler.SocketState.CLOSED);




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






svn commit: r521795 - /tomcat/connectors/trunk/jk/native/apache-2.0/Makefile.vc

2007-03-23 Thread mturk
Author: mturk
Date: Fri Mar 23 09:25:54 2007
New Revision: 521795

URL: http://svn.apache.org/viewvc?view=rev&rev=521795
Log:
Add option to compile for Apache 2.0.x or Apache 2.2.x by using APACHE22=1 in 
command line

Modified:
tomcat/connectors/trunk/jk/native/apache-2.0/Makefile.vc

Modified: tomcat/connectors/trunk/jk/native/apache-2.0/Makefile.vc
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/Makefile.vc?view=diff&rev=521795&r1=521794&r2=521795
==
--- tomcat/connectors/trunk/jk/native/apache-2.0/Makefile.vc (original)
+++ tomcat/connectors/trunk/jk/native/apache-2.0/Makefile.vc Fri Mar 23 
09:25:54 2007
@@ -1,28 +1,18 @@
-# Microsoft Developer Studio Generated NMAKE File, Based on mod_jk.dsp
-!IF "$(CFG)" == ""
-CFG=apache - Win32 Release
-!MESSAGE No configuration specified. Defaulting to apache - Win32 Release.
-!ENDIF 
-
-!IF "$(CFG)" != "apache - Win32 Release"
-!MESSAGE Invalid configuration "$(CFG)" specified.
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "Makefile.vc" CFG="apache - Win32 Release"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "apache - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE 
-!ERROR An invalid configuration is specified.
-!ENDIF 
-
-!IF "$(OS)" == "Windows_NT"
-NULL=
-!ELSE 
-NULL=nul
-!ENDIF 
+!IFDEF APACHE22
+APACHE2_HOME=$(APACHE22_HOME)
+APR_LIB=libapr-1.lib
+APU_LIB=libaprutil-1.lib
+!ELSE
+APR_LIB=libapr.lib
+APU_LIB=libaprutil.lib
+!IFDEF APACHE20_HOME
+APACHE2_HOME=$(APACHE20_HOME)
+!ENDIF
+!ENDIF
+
+!IFNDEF APACHE2_HOME
+!ERROR Missing APACHE2_HOME environment variable.
+!ENDIF
 
 CPP=cl.exe
 MTL=midl.exe
@@ -73,7 +63,7 @@
 BSC32_SBRS= \

 LINK32=link.exe
-LINK32_FLAGS=libhttpd.lib libapr.lib libaprutil.lib kernel32.lib user32.lib 
advapi32.lib wsock32.lib /nologo /base:"0x6A6B" /subsystem:windows /dll 
/incremental:no /pdb:"$(OUTDIR)\mod_jk.pdb" /debug /machine:I386 
/out:"$(OUTDIR)\mod_jk.so" /implib:"$(OUTDIR)\mod_jk.lib" 
/libpath:"$(APACHE2_HOME)\lib" /opt:ref 
+LINK32_FLAGS=libhttpd.lib $(APR_LIB) $(APU_LIB) kernel32.lib user32.lib 
advapi32.lib wsock32.lib /nologo /base:"0x6A6B" /subsystem:windows /dll 
/incremental:no /pdb:"$(OUTDIR)\mod_jk.pdb" /debug /machine:I386 
/out:"$(OUTDIR)\mod_jk.so" /implib:"$(OUTDIR)\mod_jk.lib" 
/libpath:"$(APACHE2_HOME)\lib" /opt:ref 
 LINK32_OBJS= \
"$(INTDIR)\jk_ajp12_worker.obj" \
"$(INTDIR)\jk_ajp13.obj" \
@@ -136,16 +126,6 @@
 
 MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
 
-!IF "$(NO_EXTERNAL_DEPS)" != "1"
-!IF EXISTS("mod_jk.dep")
-!INCLUDE "mod_jk.dep"
-!ELSE 
-!MESSAGE Warning: cannot find "mod_jk.dep"
-!ENDIF 
-!ENDIF 
-
-
-!IF "$(CFG)" == "apache - Win32 Release"
 SOURCE=..\common\jk_ajp12_worker.c
 
 "$(INTDIR)\jk_ajp12_worker.obj" : $(SOURCE) "$(INTDIR)"
@@ -269,8 +249,4 @@
 SOURCE=.\mod_jk.c
 
 "$(INTDIR)\mod_jk.obj" : $(SOURCE) "$(INTDIR)"
-
-
-
-!ENDIF 
 



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



Re: svn commit: r521787 - /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

2007-03-23 Thread Filip Hanik - Dev Lists

Peter Rossbach wrote:

Hi Filip,

why you log a warn message and control it with debug level?
cause it is a warning message, I just don't want to show the warning 
unless debug is enabled.

Filip



Peter


Am 23.03.2007 um 17:12 schrieb [EMAIL PROTECTED]:


Author: fhanik
Date: Fri Mar 23 09:12:09 2007
New Revision: 521787

URL: http://svn.apache.org/viewvc?view=rev&rev=521787
Log:
choke the log statement, not needed

Modified:

tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java


Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?view=diff&rev=521787&r1=521786&r2=521787 

== 

--- 
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java 
(original)
+++ 
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java 
Fri Mar 23 09:12:09 2007

@@ -1480,7 +1480,6 @@
 }
 }catch ( IOException x ) {
 if ( log.isDebugEnabled() ) log.warn("Unable to 
complete sendfile request:", x);
-else log.warn("Unable to complete sendfile 
request:"+x.getMessage());

 cancelledKey(sk,SocketStatus.ERROR,false);
 return false;
 }catch ( Throwable t ) {
@@ -1968,7 +1967,6 @@
 handshake = -1;
 }
 if ( handshake == 0 ) {
-// Process the request from this socket
 // Process the request from this socket
 boolean closed = 
(status==null)?(handler.process(socket)==Handler.SocketState.CLOSED) :
 
(handler.event(socket,status)==Handler.SocketState.CLOSED);




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








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



DO NOT REPLY [Bug 41939] New: - NPE in Logging due to classloading

2007-03-23 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=41939

   Summary: NPE in Logging due to classloading
   Product: Tomcat 5
   Version: 5.5.20
  Platform: Other
OS/Version: Windows XP
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


Actually this Bug happens also in 5.5.23. It does not happen in 5.5.9.

Ok, we have a webapplication that contains each and every lib it will ever
require. Due to some prepackaged JAR-files it even contains log4j and
commons-logging twice. One in WEB-INF/lib and one inside a jar in WEB-INF/lib.

There is a commons-logging (1.0.4) in commons/lib of tomcat, but not log4j.

We use Anti-Jar|Resource-Locking on Windows.

When deploying an application using the manager or the ant-tasks, everything is
fine. Also removing and deploying a new version works.

If we reload the application, it will refuse to reload with an NPE. 

I tracked the application source in the debugger and trapped the NPE. I have
never seen this, but this is the fact:

I can see the complete call stack and inside Log4j the function converter.format
is called with a valid reference to a StringBuffer which suddenly becomes "null"
in the static method PatternConverter.spacePad()!

I can only explain this with the hierarchical Classloader mixing classes and
beeing unable to transport the reference to the StringBuffer from the instance
that is loaded in another class to the Classloader carriing the static
PatternConverter class. 

I could "solve" this issue by putting the log4j.jar in the common/lib directory
and restart the server. If I remove it from there or if I remove it completely
from my application (also from jar files in my application) it works. 

Best regards, 

Thomas


Stacktrace follows: Exception on reload in /manager

[23 Mrz 22:01:59:139][INFO ][closing any session, if still open
][de.srs.pen.vwopenday2006.StrutsServlet]
[23 Mrz 22:01:59:139][DEBUG][closeSessionSilent on sid 0
][de.srs.pen.dao.DAOSessionFactory]
[23 Mrz 22:01:59:139][DEBUG][Initializing Thread Local for refcounting on 0
][de.srs.pen.dao.DAOSessionFactory]
[23 Mrz 22:01:59:139][DEBUG][closing session, removing thread locals
][de.srs.pen.dao.DAOSessionFactory]
[23 Mrz 22:01:59:139][DEBUG][Resetting refcounter on session 0
][de.srs.pen.dao.DAOSessionFactory]
[23 Mrz 22:01:59:139][DEBUG][reset counter 0 to 0
][de.srs.pen.dao.DAOSessionFactory]
[23 Mrz 22:01:59:139][DEBUG][checking for leftover transaction
][de.srs.pen.dao.DAOSessionFactory]
[23 Mrz 22:01:59:139][DEBUG][Resetting refcounter on Transaction 0
][de.srs.pen.dao.DAOSessionFactory]
[23 Mrz 22:01:59:139][DEBUG][Initializing Thread Local for refcounting on 0
][de.srs.pen.dao.DAOSessionFactory]
[23 Mrz 22:01:59:139][DEBUG][reset counter 0 to 0
][de.srs.pen.dao.DAOSessionFactory]
[23 Mrz 22:01:59:139][INFO ][Destroy complete
][de.srs.pen.vwopenday2006.StrutsServlet]
[23 Mrz 22:01:59:139][DEBUG][JspServlet.destroy()
][org.apache.jasper.servlet.JspServlet]
[23 Mrz 22:01:59:139][DEBUG][Stopping filters
][org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/SurveyDay]]
[23 Mrz 22:01:59:139][DEBUG][Stopping ][org.apache.catalina.session.ManagerBase]
[23 Mrz 22:01:59:139][DEBUG][Unloading persisted sessions
][org.apache.catalina.session.ManagerBase]
[23 Mrz 22:01:59:139][DEBUG][Saving persisted sessions to SESSIONS.ser
][org.apache.catalina.session.ManagerBase]
[23 Mrz 22:01:59:139][DEBUG][Unloading 0 sessions
][org.apache.catalina.session.ManagerBase]
[23 Mrz 22:01:59:139][DEBUG][Expiring 0 persisted sessions
][org.apache.catalina.session.ManagerBase]
[23 Mrz 22:01:59:139][DEBUG][Unloading complete
][org.apache.catalina.session.ManagerBase]
23.03.2007 22:02:00 org.apache.commons.modeler.Registry registerComponent
SCHWERWIEGEND: Null component
Catalina:type=JspMonitor,name=jsp,WebModule=//localhost/SurveyDay,J2EEApplication=none,J2EEServer=none
23.03.2007 22:02:00 org.apache.catalina.core.ApplicationContext log
SCHWERWIEGEND: HTMLManager: ManagerServlet.reload[/SurveyDay]
java.lang.NullPointerException
 at org.apache.log4j.helpers.PatternConverter.spacePad(PatternConverter.java:92)
 at org.apache.log4j.helpers.PatternConverter.format(PatternConverter.java:71)
 at org.apache.log4j.PatternLayout.format(PatternLayout.java:495)
 at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:292)
 at org.apache.log4j.WriterAppender.append(WriterAppender.java:150)
 at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:221)
 at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:57)
 at org

DO NOT REPLY [Bug 41782] - BUILDING.txt incorrectly refers to "proxy.use" but it should be "useproxy"

2007-03-23 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=41782


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE




--- Additional Comments From [EMAIL PROTECTED]  2007-03-23 16:44 ---


*** This bug has been marked as a duplicate of 41557 ***

-- 
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 41557] - build.xml uses a different (from the documentation) variable to enable proxying

2007-03-23 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=41557


[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]




--- Additional Comments From [EMAIL PROTECTED]  2007-03-23 16:44 ---
*** Bug 41782 has been marked as a duplicate of this bug. ***

-- 
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]



svn commit: r521970 - in /tomcat/site/trunk: docs/security-4.html xdocs/security-4.xml

2007-03-23 Thread markt
Author: markt
Date: Fri Mar 23 20:12:35 2007
New Revision: 521970

URL: http://svn.apache.org/viewvc?view=rev&rev=521970
Log:
Add information on cve-2002-1895

Modified:
tomcat/site/trunk/docs/security-4.html
tomcat/site/trunk/xdocs/security-4.xml

Modified: tomcat/site/trunk/docs/security-4.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/security-4.html?view=diff&rev=521970&r1=521969&r2=521970
==
--- tomcat/site/trunk/docs/security-4.html (original)
+++ tomcat/site/trunk/docs/security-4.html Fri Mar 23 20:12:35 2007
@@ -449,6 +449,21 @@
onwards.
 
 Affects: 4.0.3?
+
+
+important: Denial of service
+   http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2002-1895";>
+   CVE-2002-1895
+
+
+
+This issue only affects configurations that use IIS in conjunction with
+   Tomcat and the AJP1.3 connector. It can not be reproduced using Windows
+   2000 SP4 with latest patches and Tomcat 4.0.4 with JDK 1.3.1. The
+   vulnerability reports for this issue state that it is fixed in 4.1.10
+   onwards.
+
+Affects: 4.0.4?
   
 
 

Modified: tomcat/site/trunk/xdocs/security-4.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/security-4.xml?view=diff&rev=521970&r1=521969&r2=521970
==
--- tomcat/site/trunk/xdocs/security-4.xml (original)
+++ tomcat/site/trunk/xdocs/security-4.xml Fri Mar 23 20:12:35 2007
@@ -152,6 +152,18 @@
onwards.
 
 Affects: 4.0.3?
+
+important: Denial of service
+   http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2002-1895";>
+   CVE-2002-1895
+
+This issue only affects configurations that use IIS in conjunction with
+   Tomcat and the AJP1.3 connector. It can not be reproduced using Windows
+   2000 SP4 with latest patches and Tomcat 4.0.4 with JDK 1.3.1. The
+   vulnerability reports for this issue state that it is fixed in 4.1.10
+   onwards.
+
+Affects: 4.0.4?
   
 
 



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



svn commit: r521971 - in /tomcat/site/trunk: docs/ xdocs/stylesheets/

2007-03-23 Thread markt
Author: markt
Date: Fri Mar 23 20:14:53 2007
New Revision: 521971

URL: http://svn.apache.org/viewvc?view=rev&rev=521971
Log:
Update copyright notice

Modified:
tomcat/site/trunk/docs/bugreport.html
tomcat/site/trunk/docs/contact.html
tomcat/site/trunk/docs/download-33.html
tomcat/site/trunk/docs/download-41.html
tomcat/site/trunk/docs/download-55.html
tomcat/site/trunk/docs/download-60.html
tomcat/site/trunk/docs/download-connectors.html
tomcat/site/trunk/docs/findhelp.html
tomcat/site/trunk/docs/getinvolved.html
tomcat/site/trunk/docs/heritage.html
tomcat/site/trunk/docs/index.html
tomcat/site/trunk/docs/irc.html
tomcat/site/trunk/docs/legal.html
tomcat/site/trunk/docs/lists.html
tomcat/site/trunk/docs/migration.html
tomcat/site/trunk/docs/resources.html
tomcat/site/trunk/docs/security-3.html
tomcat/site/trunk/docs/security-4.html
tomcat/site/trunk/docs/security-5.html
tomcat/site/trunk/docs/security-6.html
tomcat/site/trunk/docs/security-impact.html
tomcat/site/trunk/docs/security-jk.html
tomcat/site/trunk/docs/security.html
tomcat/site/trunk/docs/svn.html
tomcat/site/trunk/docs/whichversion.html
tomcat/site/trunk/docs/whoweare.html
tomcat/site/trunk/xdocs/stylesheets/tomcat-site.xsl

Modified: tomcat/site/trunk/docs/bugreport.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/bugreport.html?view=diff&rev=521971&r1=521970&r2=521971
==
--- tomcat/site/trunk/docs/bugreport.html (original)
+++ tomcat/site/trunk/docs/bugreport.html Fri Mar 23 20:14:53 2007
@@ -518,7 +518,7 @@
 
 
 
-Copyright © 1999-2006, The Apache Software Foundation
+Copyright © 1999-2007, The Apache Software Foundation
 
 
 

Modified: tomcat/site/trunk/docs/contact.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/contact.html?view=diff&rev=521971&r1=521970&r2=521971
==
--- tomcat/site/trunk/docs/contact.html (original)
+++ tomcat/site/trunk/docs/contact.html Fri Mar 23 20:14:53 2007
@@ -285,7 +285,7 @@
 
 
 
-Copyright © 1999-2006, The Apache Software Foundation
+Copyright © 1999-2007, The Apache Software Foundation
 
 
 

Modified: tomcat/site/trunk/docs/download-33.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/download-33.html?view=diff&rev=521971&r1=521970&r2=521971
==
--- tomcat/site/trunk/docs/download-33.html (original)
+++ tomcat/site/trunk/docs/download-33.html Fri Mar 23 20:14:53 2007
@@ -296,7 +296,7 @@
 
 
 
-Copyright © 1999-2006, The Apache Software Foundation
+Copyright © 1999-2007, The Apache Software Foundation
 
 
 

Modified: tomcat/site/trunk/docs/download-41.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/download-41.html?view=diff&rev=521971&r1=521970&r2=521971
==
--- tomcat/site/trunk/docs/download-41.html (original)
+++ tomcat/site/trunk/docs/download-41.html Fri Mar 23 20:14:53 2007
@@ -475,7 +475,7 @@
 
 
 
-Copyright © 1999-2006, The Apache Software Foundation
+Copyright © 1999-2007, The Apache Software Foundation
 
 
 

Modified: tomcat/site/trunk/docs/download-55.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/download-55.html?view=diff&rev=521971&r1=521970&r2=521971
==
--- tomcat/site/trunk/docs/download-55.html (original)
+++ tomcat/site/trunk/docs/download-55.html Fri Mar 23 20:14:53 2007
@@ -786,7 +786,7 @@
 
 
 
-Copyright © 1999-2006, The Apache Software Foundation
+Copyright © 1999-2007, The Apache Software Foundation
 
 
 

Modified: tomcat/site/trunk/docs/download-60.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/download-60.html?view=diff&rev=521971&r1=521970&r2=521971
==
--- tomcat/site/trunk/docs/download-60.html (original)
+++ tomcat/site/trunk/docs/download-60.html Fri Mar 23 20:14:53 2007
@@ -444,7 +444,7 @@
 
 
 
-Copyright © 1999-2006, The Apache Software Foundation
+Copyright © 1999-2007, The Apache Software Foundation
 
 
 

Modified: tomcat/site/trunk/docs/download-connectors.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/download-connectors.html?view=diff&rev=521971&r1=521970&r2=521971
==
--- tomcat/site/trunk/docs/download-connectors.html (original)
+++ tomcat/site/trunk/docs/download-connectors.html Fri Mar 23 20:14:53 2007
@@ -3,16 +3,16 @@
 
 
 Apache Tomcat - Tomcat Connectors (mod_jk) Downloads
-
+
 
-
-
+
+