DO NOT REPLY [Bug 52718] New: An incomplete fix for the resource leak bug in NioEndpoint.java

2012-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52718

 Bug #: 52718
   Summary: An incomplete fix for the resource leak bug in
NioEndpoint.java
   Product: Tomcat 6
   Version: unspecified
  Platform: PC
Status: NEW
  Severity: critical
  Priority: P2
 Component: Connectors
AssignedTo: dev@tomcat.apache.org
ReportedBy: liangg...@sei.pku.edu.cn
Classification: Unclassified


The fix revision 424429 was aimed to remove an resource leak bug on the 
SocketChannelobject   "channel"  in the method "findJarServiceProvider" of the
file 

"/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java" , but
it is incomplete. 

When the statements at lines 1142-1153 or line 1162 throw any eception, the
object "channel" can not be closed as expected. The best way to close such
resource object is putting such close operations in the finally block.

This problem is not handled in the head revision of tomcat 6.0 and also tomcat
7.0. 

The code in the head revision needing to be inspected is as bellow: 

public void run() {

// Loop until we receive a shutdown command
while (running) {
// Loop if endpoint is paused
while (paused) {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// Ignore
}
}
boolean hasEvents = false;

hasEvents = (hasEvents | events());
// Time to terminate?
if (close) return;

int keyCount = 0;
try {
keyCount = selector.select(selectorTimeout);
} catch (Throwable x) {
log.error("",x);
continue;
}

//either we timed out or we woke up, process events first
if ( keyCount == 0 ) hasEvents = (hasEvents | events());

//if (keyCount == 0) continue;

Iterator iterator = keyCount > 0 ?
selector.selectedKeys().iterator() : null;
// Walk through the collection of ready keys and dispatch
// any active event.
while (iterator != null && iterator.hasNext()) {
SelectionKey sk = (SelectionKey) iterator.next();
iterator.remove();
KeyAttachment attachment = (KeyAttachment)sk.attachment();
try {
if ( sk.isValid() ) {
if(attachment == null) attachment = new
KeyAttachment();
attachment.access();
sk.attach(attachment);
int readyOps = sk.readyOps();
sk.interestOps(sk.interestOps() & ~readyOps);
SocketChannel channel =
(SocketChannel)sk.channel();
 [1142]   boolean read = sk.isReadable();
if (read) {
if ( attachment.getWakeUp() ) {
attachment.setWakeUp(false);
synchronized (attachment.getMutex())
{attachment.getMutex().notifyAll();}
} else if ( attachment.getComet() ) {
if (!processSocket(channel,false))
processSocket(channel,true);
} else {
boolean close = (!processSocket(channel));
if ( close ) {
channel.socket().close();
 【1154】   channel.close();
}
}
}
} else {
//invalid key
cancelledKey(sk);
}
} catch ( CancelledKeyException ckx ) {
[1162]if (attachment!=null && attachment.getComet())
processSocket( (SocketChannel) sk.channel(), true);
try {
sk.channel().close();
}catch ( Exception ignore){}
} catch (Throwable t) {
log.error("",t);
}
}//while
//process timeouts
timeout(keyCount,hasEvents);
}//while
synchronized (this) {
this.notifyAll();
}

}

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

DO NOT REPLY [Bug 52719] New: An incomplete fix for the resource leak bug in WebappClassLoader.java

2012-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52719

 Bug #: 52719
   Summary: An incomplete fix for the resource leak bug in
WebappClassLoader.java
   Product: Tomcat 6
   Version: unspecified
  Platform: PC
Status: NEW
  Severity: critical
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: liangg...@sei.pku.edu.cn
Classification: Unclassified


The fix revision 423920 was aimed to remove an resource leak bug on the 
JarFile "jarFile "  in the method "validateJarFile" of the file
"/tomcat/tc6.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java"
, but it is incomplete. 

When the statements at lines 3226-3245 throw any eception, the object "jarFile
" can not be closed as expected. The best way to close such resource object is
putting such close operations in the finaly block of a try-catch-finally
structure.

The buggy code is copies as bellows: 


3220 protected boolean validateJarFile(File jarfile)
throws IOException {

if (triggers == null)
return (true);
3225JarFile jarFile = new JarFile(jarfile);
3226for (int i = 0; i < triggers.length; i++) {
Class clazz = null;
try {
if (parent != null) {
clazz = parent.loadClass(triggers[i]);
} else {
clazz = Class.forName(triggers[i]);
}
} catch (Throwable t) {
clazz = null;
}
if (clazz == null)
continue;
String name = triggers[i].replace('.', '/') + ".class";
if (log.isDebugEnabled())
log.debug(" Checking for " + name);
JarEntry jarEntry = jarFile.getJarEntry(name);
if (jarEntry != null) {
log.info("validateJarFile(" + jarfile + 
") - jar not loaded. See Servlet Spec 2.3, "
+ "section 9.7.2. Offending class: " + name);
3246jarFile.close();
return (false);
}
}
jarFile.close();
return (true);

}

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

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



DO NOT REPLY [Bug 52720] New: An incomplete fix for the resource leak bugs in ManagerBase.java

2012-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52720

 Bug #: 52720
   Summary: An incomplete fix for the resource leak bugs in
ManagerBase.java
   Product: Tomcat 6
   Version: unspecified
  Platform: PC
Status: NEW
  Severity: critical
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: liangg...@sei.pku.edu.cn
Classification: Unclassified


The fix revision 777567 was aimed to remove an resource leak bug on the 
DataInputStream object "randomIS"in the method "run" of the file
"/tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/ManagerBase.java" , but
it is incomplete. 

When the statements at lines 256 throw any eception, the object "randomIS" can
not be closed as expected. The best way to close such resource object is
putting such close operations in the finaly block of a try-catch-finally
structure.

Besides that, when DataInputStream is created unsuccessfully but the  temp
FileInputStream object is created successfully at lines 250,  the temp
FileInputStream object will be leak. 

The Same problem is also existed in the method of "setRandomFile".  "randomIS"
should also be closed in the finally block of a try-catch-finally clause, and
the temp FileInputStream object should also be closed explicitly. 

The buggy code is copies as bellows: 


 private class PrivilegedSetRandomFile
implements PrivilegedAction{

public PrivilegedSetRandomFile(String s) {
devRandomSource = s;
}

public DataInputStream run(){
try {
File f=new File( devRandomSource );
if( ! f.exists() ) return null;
 250  randomIS= new DataInputStream( new FileInputStream(f));
randomIS.readLong();
if( log.isDebugEnabled() )
log.debug( "Opening " + devRandomSource );
return randomIS;
} catch (IOException ex){
log.warn("Error reading " + devRandomSource, ex);
 257   if (randomIS != null) {
try {
randomIS.close();
} catch (Exception e) {
log.warn("Failed to close randomIS.");
}
}
devRandomSource = null;
randomIS=null;
return null;
}
}
}


  public void setRandomFile( String s ) {
// as a hack, you can use a static file - and generate the same
// session ids ( good for strange debugging )
if (Globals.IS_SECURITY_ENABLED){
randomIS = AccessController.doPrivileged(new
PrivilegedSetRandomFile(s));
} else {
try{
devRandomSource=s;
File f=new File( devRandomSource );
if( ! f.exists() ) return;
randomIS= new DataInputStream( new FileInputStream(f));
randomIS.readLong();
if( log.isDebugEnabled() )
log.debug( "Opening " + devRandomSource );
} catch( IOException ex ) {
553log.warn("Error reading " + devRandomSource, ex);
if (randomIS != null) {
try {
randomIS.close();
} catch (Exception e) {
log.warn("Failed to close randomIS.");
}
}
devRandomSource = null;
randomIS=null;
}
}
}

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

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



DO NOT REPLY [Bug 52721] New: An incomplete fix for the resource leak bug in StandardContext.java

2012-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52721

 Bug #: 52721
   Summary: An incomplete fix for the resource leak bug in
StandardContext.java
   Product: Tomcat 6
   Version: unspecified
  Platform: PC
Status: NEW
  Severity: critical
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: liangg...@sei.pku.edu.cn
Classification: Unclassified


The fix revision 423920 was aimed to remove an resource leak bug on the 
FileOutputStream object "fos"and the ObjectOutputStream "oos"  in the method
"cacheContext" of the file
"/tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardContext.java" ,
but it is incomplete. 

When the statements at lines 4792 throw any eception, the objects "fos" and
"oos" can not be closed as expected. The best way to close such resource object
is putting such close operations in the finaly block of a try-catch-finally
structure.

Besides that, when oos is created unsuccessfully but "fos"  is created
successfully,  "fos" will also be leaked. 


The buggy code in the head revision is copied as bellows:


 private void cacheContext() {
try {
File workDir=new File( getWorkPath() );

File ctxSer=new File( workDir, "_tomcat_context.ser");
FileOutputStream fos=new FileOutputStream( ctxSer );
ObjectOutputStream oos=new ObjectOutputStream( fos );
oos.writeObject(this);
[line 4793]oos.close();
[line 4794]fos.close();
} catch( Throwable t ) {
if(log.isInfoEnabled())
log.info("Error saving context.ser ", t);
}
}

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

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



[RESULT] [VOTE] Release Apache Tomcat 7.0.26

2012-02-21 Thread Mark Thomas
Binding votes:
+1: mturk, markt, hgomez, yoavs, olamy, rjung

Non-binding votes:
+1: kfujino

The vote therefore passes.

I'll move the bits shortly and announce once the mirrors have sync'd.

Mark

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



DO NOT REPLY [Bug 52722] New: An incomplete fix for the resource leak bug in HTMLManagerServlet.java

2012-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52722

 Bug #: 52722
   Summary: An incomplete fix for the resource leak bug in
HTMLManagerServlet.java
   Product: Tomcat 6
   Version: unspecified
  Platform: PC
Status: NEW
  Severity: critical
  Priority: P2
 Component: Manager application
AssignedTo: dev@tomcat.apache.org
ReportedBy: liangg...@sei.pku.edu.cn
Classification: Unclassified


The fix revision 412780 was aimed to remove an resource leak bug on the  
PrintWriter object "writer "in the method "cacheContext" of the file 
"/tomcat/tc6.0.x/trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java"
, but it is incomplete. 

When the statements at lines 309-540 throw any eception, the objects
"writer"can 
not be closed as expected. The best way to close such resource object is
putting  
such close operations in the finaly block of a try-catch-finally structure.

The buggy code in the head revision is copied  as bellows:

 public void list(HttpServletRequest request,
 HttpServletResponse response,
 String message) throws IOException {

if (debug >= 1)
log("list: Listing contexts for virtual host '" +
host.getName() + "'");

308PrintWriter writer = response.getWriter();

// HTML Header Section
writer.print(Constants.HTML_HEADER_SECTION);
。

// Finish up the response
writer.flush();
541writer.close();
}

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r505 - /dev/tomcat/tomcat-7/v7.0.26/ /release/tomcat/tomcat-7/v7.0.26/

2012-02-21 Thread markt
Author: markt
Date: Tue Feb 21 10:09:25 2012
New Revision: 505

Log:
Release 7.0.26

Added:
release/tomcat/tomcat-7/v7.0.26/
  - copied from r504, dev/tomcat/tomcat-7/v7.0.26/
Removed:
dev/tomcat/tomcat-7/v7.0.26/


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



svn commit: r505 - /dev/tomcat/tomcat-7/v7.0.26/ /release/tomcat/tomcat-7/v7.0.26/

2012-02-21 Thread markt
Author: markt
Date: Tue Feb 21 10:09:25 2012
New Revision: 505

Log:
Release 7.0.26

Added:
release/tomcat/tomcat-7/v7.0.26/
  - copied from r504, dev/tomcat/tomcat-7/v7.0.26/
Removed:
dev/tomcat/tomcat-7/v7.0.26/


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



Re: [VOTE] Release Apache Tomcat 7.0.26

2012-02-21 Thread Konstantin Kolinko
2012/2/18 Mark Thomas :
> The proposed Apache Tomcat 7.0.26 release is now available for voting.
>
> It can be obtained from:
> https://dist.apache.org/repos/dist/dev/tomcat/tomcat-7/v7.0.26/
> The Maven staging repo is:
> https://repository.apache.org/content/repositories/orgapachetomcat-020/
> The svn tag is:
> http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_26/
>
> The proposed 7.0.26 release is:
> [ ] Broken - do not release
> [x] Stable - go ahead and release as 7.0.26 Stable
>

Best regards,
Konstantin Kolinko

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



DO NOT REPLY [Bug 52723] New: An incomplete fix for the resource leak bugs in StandardManager.java

2012-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52723

 Bug #: 52723
   Summary: An incomplete fix for the resource leak bugs in
StandardManager.java
   Product: Tomcat 6
   Version: unspecified
  Platform: PC
Status: NEW
  Severity: critical
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: liangg...@sei.pku.edu.cn
Classification: Unclassified


The fix revision 907502 was aimed to remove an resource leak bug on the 
FileOutputStream object "fos" and the ObjectOutputStream "oos" in the method 
"doUnload" of the file 
"/tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/StandardManager.java" , 
but it is incomplete. 

When the ObjectOutputStream object is created unsuccessfully but the temp 
BufferedOutputStream object is created successfully, the temp object will be 
leaked. 

Besides that, the "oos" is not closed in all the pathes.  The best way to close 
such resource object is putting such close operations in the finaly block of a 
try-catch-finally structure.

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

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



svn commit: r1291696 - in /tomcat/site/trunk: docs/download-70.html docs/index.html docs/migration-7.html docs/oldnews.html docs/whichversion.html xdocs/download-70.xml xdocs/index.xml xdocs/migration

2012-02-21 Thread markt
Author: markt
Date: Tue Feb 21 10:26:02 2012
New Revision: 1291696

URL: http://svn.apache.org/viewvc?rev=1291696&view=rev
Log:
Update for 7.0.26 release

Modified:
tomcat/site/trunk/docs/download-70.html
tomcat/site/trunk/docs/index.html
tomcat/site/trunk/docs/migration-7.html
tomcat/site/trunk/docs/oldnews.html
tomcat/site/trunk/docs/whichversion.html
tomcat/site/trunk/xdocs/download-70.xml
tomcat/site/trunk/xdocs/index.xml
tomcat/site/trunk/xdocs/migration-7.xml
tomcat/site/trunk/xdocs/oldnews.xml
tomcat/site/trunk/xdocs/whichversion.xml

Modified: tomcat/site/trunk/docs/download-70.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/download-70.html?rev=1291696&r1=1291695&r2=1291696&view=diff
==
--- tomcat/site/trunk/docs/download-70.html (original)
+++ tomcat/site/trunk/docs/download-70.html Tue Feb 21 10:26:02 2012
@@ -218,8 +218,8 @@
 
 
 http://www.apache.org/dist/tomcat/tomcat-7/KEYS";>KEYS |
-7.0.25 |
-Browse 
|
+7.0.26 |
+Browse 
|
 http://archive.apache.org/dist/tomcat/tomcat-7";>Archives
   
 
@@ -305,7 +305,7 @@
 
 
 
-7.0.25
+7.0.26
 
 
 
@@ -314,8 +314,8 @@
   
 
   
-Please see the 
-  README
+Please see the 
+  README
   file for packaging information.  It explains what every distribution 
contains.
   
 
@@ -336,44 +336,44 @@
   
 
 
-zip 
-(http://www.apache.org/dist/tomcat/tomcat-7/v7.0.25/bin/apache-tomcat-7.0.25.zip.asc";>pgp,
 
-http://www.apache.org/dist/tomcat/tomcat-7/v7.0.25/bin/apache-tomcat-7.0.25.zip.md5";>md5)
+zip 
+(http://www.apache.org/dist/tomcat/tomcat-7/v7.0.26/bin/apache-tomcat-7.0.26.zip.asc";>pgp,
 
+http://www.apache.org/dist/tomcat/tomcat-7/v7.0.26/bin/apache-tomcat-7.0.26.zip.md5";>md5)
   
   
 
 
-tar.gz 
-(http://www.apache.org/dist/tomcat/tomcat-7/v7.0.25/bin/apache-tomcat-7.0.25.tar.gz.asc";>pgp,
 
-http://www.apache.org/dist/tomcat/tomcat-7/v7.0.25/bin/apache-tomcat-7.0.25.tar.gz.md5";>md5)
+tar.gz 
+(http://www.apache.org/dist/tomcat/tomcat-7/v7.0.26/bin/apache-tomcat-7.0.26.tar.gz.asc";>pgp,
 
+http://www.apache.org/dist/tomcat/tomcat-7/v7.0.26/bin/apache-tomcat-7.0.26.tar.gz.md5";>md5)
   
   
 
 
-32-bit Windows zip 
-(http://www.apache.org/dist/tomcat/tomcat-7/v7.0.25/bin/apache-tomcat-7.0.25-windows-x86.zip.asc";>pgp,
 
-http://www.apache.org/dist/tomcat/tomcat-7/v7.0.25/bin/apache-tomcat-7.0.25-windows-x86.zip.md5";>md5)
+32-bit Windows zip 
+(http://www.apache.org/dist/tomcat/tomcat-7/v7.0.26/bin/apache-tomcat-7.0.26-windows-x86.zip.asc";>pgp,
 
+http://www.apache.org/dist/tomcat/tomcat-7/v7.0.26/bin/apache-tomcat-7.0.26-windows-x86.zip.md5";>md5)
   
   
 
 
-64-bit Windows zip 
-(http://www.apache.org/dist/tomcat/tomcat-7/v7.0.25/bin/apache-tomcat-7.0.25-windows-x64.zip.asc";>pgp,
 
-http://www.apache.org/dist/tomcat/tomcat-7/v7.0.25/bin/apache-tomcat-7.0.25-windows-x64.zip.md5";>md5)
+64-bit Windows zip 
+(http://www.apache.org/dist/tomcat/tomcat-7/v7.0.26/bin/apache-tomcat-7.0.26-windows-x64.zip.asc";>pgp,
 
+http://www.apache.org/dist/tomcat/tomcat-7/v7.0.26/bin/apache-tomcat-7.0.26-windows-x64.zip.md5";>md5)
   
   
 
 
-64-bit Itanium Windows zip 
-(http://www.apache.org/dist/tomcat/tomcat-7/v7.0.25/bin/apache-tomcat-7.0.25-windows-i64.zip.asc";>pgp,
 
-http://www.apache.org/dist/tomcat/tomcat-7/v7.0.25/bin/apache-tomcat-7.0.25-windows-i64.zip.md5";>md5)
+64-bit Itanium Windows zip 
+(http://www.apache.org/dist/tomcat/tomcat-7/v7.0.26/bin/apache-tomcat-7.0.26-windows-i64.zip.asc";>pgp,
 
+http://www.apache.org/dist/tomcat/tomcat-7/v7.0.26/bin/apache-tomcat-7.0.26-windows-i64.zip.md5";>md5)
   
   
 
 
-32-bit/64-bit Windows Service Installer 
-(http://www.apache.org/dist/tomcat/tomcat-7/v7.0.25/bin/apache-tomcat-7.0.25.exe.asc";>pgp,
 
-http://www.apache.org/dist/tomcat/tomcat-7/v7.0.25/bin/apache-tomcat-7.0.25.exe.md5";>md5)
+32-bit/64-bit Windows Service Installer 
+(http://www.apache.org/dist/tomcat/tomcat-7/v7.0.26/bin/apache-tomcat-7.0.26.exe.asc";>pgp,
 
+http://www.apache.org/dist/tomcat/tomcat-7/v7.0.26/bin/apache-tomcat-7.0.26.exe.md5";>md5)
   
   
 
@@ -385,9 +385,9 @@
   
 
 
-tar.gz 
-(http://www.apache.org/dist/tomcat/tomcat-7/v7.0.25/bin/apache-tomcat-7.0.25-fulldocs.tar.gz.asc";>pgp,
 
-http://www.apache.org/dist/tomcat/tomcat-7/v7.0.25/bin/apache-tomcat-7.0.25-fulldocs.tar.gz.md5";>md5)
+tar.gz 
+(http://www.apache.

DO NOT REPLY [Bug 52724] New: An incomplete fix for the resource leak bugs in Catalina.java

2012-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52724

 Bug #: 52724
   Summary: An incomplete fix for the resource leak bugs in
Catalina.java
   Product: Tomcat 7
   Version: trunk
  Platform: PC
Status: NEW
  Severity: critical
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: liangg...@sei.pku.edu.cn
Classification: Unclassified


The fix revision 730178 was aimed to remove an resource leak bug on the 
FileInputStream object "fis" (created line 458), the Socket "socket" (created
at line 477), 

the OutputStream object "stream", and the FileInputStream object "inputStream"
in the file
"/tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/Catalina.java" , but 

it is incomplete. 

There are some problems: 
1. the InputSource object "is" created at line 452 is not closed. 
2. when the statements at lines 455-457 throw some exception, the "fis" can not
be closed as expected. 
3. when the statements at lines 480-483 throw some exception, the "socket" and
the "stream" can not be closed as expected. 
4. when the statements at lines 574-576 throw some exception, the "inputStream"
can not be closed as expected. 

The best way to close such resource objects is putting such close operations in
the finaly block of a try-catch-finally structure.

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

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



DO NOT REPLY [Bug 52725] New: org.apache.jasper.compiler.JspUtil#getTagHandlerClassName() does not use org.apache.jasper.Constants.TAG_FILE_PACKAGE_NAME

2012-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52725

 Bug #: 52725
   Summary: org.apache.jasper.compiler.JspUtil#getTagHandlerClassN
ame() does not use
org.apache.jasper.Constants.TAG_FILE_PACKAGE_NAME
   Product: Tomcat 7
   Version: trunk
  Platform: All
OS/Version: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Jasper
AssignedTo: dev@tomcat.apache.org
ReportedBy: bluewolf.ch...@gmail.com
Classification: Unclassified


In the class org.apache.jasper.compiler.JspUtil, its method 

public static String getTagHandlerClassName(String path, String urn,
ErrorDispatcher err) throws JasperException {
...
}

uses the string constants directly like "org.apache.jsp.tag.web.",
"org.apache.jsp.tag.meta.".

But you know there is TAG_FILE_PACKAGE_NAME field in the class
org.apache.jasper.Constants.


The code should be adjusted like below :

Constants.TAG_FILE_PACKAGE_NAME + ".web"
Constants.TAG_FILE_PACKAGE_NAME + ".meta"

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

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



DO NOT REPLY [Bug 52725] org.apache.jasper.compiler.JspUtil#getTagHandlerClassName() does not use org.apache.jasper.Constants.TAG_FILE_PACKAGE_NAME

2012-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52725

Eugene Chung  changed:

   What|Removed |Added

 CC||bluewolf.ch...@gmail.com

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

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



DO NOT REPLY [Bug 52725] org.apache.jasper.compiler.JspUtil#getTagHandlerClassName() does not use org.apache.jasper.Constants.TAG_FILE_PACKAGE_NAME

2012-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52725

--- Comment #1 from Eugene Chung  2012-02-21 11:42:46 
UTC ---
I'm doing tasks that port Tomcat 7 Jasper to our WAS product these days. But I
couldn't change the package name of tag classes without editing
org.apache.jasper.compiler.JspUtil#getTagHandlerClassName().

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

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



DO NOT REPLY [Bug 52726] New: An incomplete fix for the resource leak bug in MemoryUserDatabase.java

2012-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52726

 Bug #: 52726
   Summary: An incomplete fix for the resource leak bug in
MemoryUserDatabase.java
   Product: Tomcat 7
   Version: trunk
  Platform: PC
Status: NEW
  Severity: critical
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: liangg...@sei.pku.edu.cn
Classification: Unclassified


The fix revision 423920 was aimed to remove an resource leak bug on the 
FileInputStream object "fis" (created line 418) in the method "open()" of the
file "/tomcat/trunk/java/org/apache/catalina/users/MemoryUserDatabase.java" ,
but it is incomplete. 

There are some problems: 
1. when the statements at lines 420-439 throw some exception, the "fis" can not
be closed as expected. 

The best way to close such resource objects is putting such close operations in
the finaly block of a try-catch-finally structure.

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

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



DO NOT REPLY [Bug 52727] New: An incomplete fix for the resource leak bug in HostConfig.java

2012-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52727

 Bug #: 52727
   Summary: An incomplete fix for the resource leak bug in
HostConfig.java
   Product: Tomcat 7
   Version: trunk
  Platform: PC
Status: NEW
  Severity: critical
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: liangg...@sei.pku.edu.cn
Classification: Unclassified


The fix revision 423920  was aimed to remove an resource leak bug on the 
BufferedOutputStream object "ostream " (created line 804) in the method
"deployWAR" of the file
"/tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java" , but it is
incomplete. 

There are some problems: 
1. when "ostream" is not created successfully but the  temp FileOutputStream
object  is created successfully  , the temp  FileOutputStream  object  will be 
leaked. 

The best way to close such resource objects is putting such close operations
for each object in the finaly block of a try-catch-finally structure.

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

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



DO NOT REPLY [Bug 52729] New: An incomplete fix for the resource leak bug in CometConnectionManagerValve.java

2012-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52729

 Bug #: 52729
   Summary: An incomplete fix for the resource leak bug in
CometConnectionManagerValve.java
   Product: Tomcat 7
   Version: trunk
  Platform: PC
Status: NEW
  Severity: critical
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: liangg...@sei.pku.edu.cn
Classification: Unclassified


The fix revision 640273 was aimed to remove an resource leak bug on the 
CometEventImpl object "cometEvent " (created line 130) in the method
"lifecycleEvent()" of the file
"/tomcat/trunk/java/org/apache/catalina/valves/CometConnectionManagerValve.java"
, but it is incomplete. 

There are some problems: 
1. when the statements at lines 131-134 throw some exception, the "cometEvent"
can not be closed as expected. 

The best way to close such resource objects is putting such close operations in
the finaly block of a try-catch-finally structure.

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

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



DO NOT REPLY [Bug 52730] New: Another incomplete fix for the resource leak bug in CometConnectionManagerValve.java

2012-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52730

 Bug #: 52730
   Summary: Another incomplete fix for the resource leak bug in
CometConnectionManagerValve.java
   Product: Tomcat 7
   Version: trunk
  Platform: PC
OS/Version: Mac System 7
Status: NEW
  Severity: critical
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: liangg...@sei.pku.edu.cn
Classification: Unclassified


The fix revision 730178 was aimed to remove an resource leak bug on the
FileInputStream object "fis " (created in line 451), the Socket object "socket"
(created in line 474) and the OutputStream object "stream" (created in line
475) in the method "stopServer()" of the file
"/tomcat/trunk/java/org/apache/catalina/valves/CometConnectionManagerValve.java"
, but it is incomplete. 

There are some problems: 
1. when the statements at lines 452-454 throw some exception, the "fis" can not
be closed as expected. 
2. when the statements at lines 475-480 throw some exception, the "socket" and
the "stream" can not be closed as expected. 

The best way to close such resource objects is putting such close operations in
the finaly block of a try-catch-finally structure.

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

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



DO NOT REPLY [Bug 52731] New: An incomplete fix for the resource leak bug in JDTCompiler.java

2012-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52731

 Bug #: 52731
   Summary: An incomplete fix for the resource leak bug in
JDTCompiler.java
   Product: Tomcat 7
   Version: trunk
  Platform: PC
Status: NEW
  Severity: critical
  Priority: P2
 Component: Jasper
AssignedTo: dev@tomcat.apache.org
ReportedBy: liangg...@sei.pku.edu.cn
Classification: Unclassified


The fix revision 1043157 was aimed to remove an resource leak bug on the
BufferedReader object "reader " (created in line 115), the FileInputStream
object "is" (created in line 112) in the method "getContents()" of the file
"/tomcat/trunk/java/org/apache/jasper/compiler/JDTCompiler.java" , but it is
incomplete. 

There are some problems: 
1. when "reader" is not created successfully but the temp InputStreamReader is
created successfully at line 114, the temp InputStreamReader will be leaked. 


The best way to close such resource objects is putting such close operations in
the finaly block of a try-catch-finally structure.

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

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



DO NOT REPLY [Bug 52732] New: An incomplete fix for the resource leak bug in ExpressionFactory.java

2012-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52732

 Bug #: 52732
   Summary: An incomplete fix for the resource leak bug in
ExpressionFactory.java
   Product: Tomcat 7
   Version: trunk
  Platform: PC
Status: NEW
  Severity: critical
  Priority: P2
 Component: Integration
AssignedTo: dev@tomcat.apache.org
ReportedBy: liangg...@sei.pku.edu.cn
Classification: Unclassified


The fix revision 1043157 was aimed to remove an resource leak bug on the
BufferedReader object "br " (created in line 231), the InputStream  object "is"
(created in line 222 or 224) in the method "getClassNameServices()" of the file 
"/tomcat/trunk/java/javax/el/ExpressionFactory.java" , but it is incomplete. 

There are some problems: 
1. when "br" is not created successfully but the temp InputStreamReader is
created successfully at line 231, the temp InputStreamReader will be leaked. 

The best way to close such resource objects is putting such close operations
for each resource object in the finaly block of a try-catch-finally structure.

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

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



svn commit: r1291760 - in /tomcat/native/branches/1.1.x: native/src/address.c xdocs/miscellaneous/changelog.xml

2012-02-21 Thread mturk
Author: mturk
Date: Tue Feb 21 13:15:42 2012
New Revision: 1291760

URL: http://svn.apache.org/viewvc?rev=1291760&view=rev
Log:
Fix BZ52717 by allowing to have %scope_id as address suffix for local-link IPv6 
addresses

Modified:
tomcat/native/branches/1.1.x/native/src/address.c
tomcat/native/branches/1.1.x/xdocs/miscellaneous/changelog.xml

Modified: tomcat/native/branches/1.1.x/native/src/address.c
URL: 
http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/native/src/address.c?rev=1291760&r1=1291759&r2=1291760&view=diff
==
--- tomcat/native/branches/1.1.x/native/src/address.c (original)
+++ tomcat/native/branches/1.1.x/native/src/address.c Tue Feb 21 13:15:42 2012
@@ -29,6 +29,8 @@ TCN_IMPLEMENT_CALL(jlong, Address, info)
 {
 apr_pool_t *p = J2P(pool, apr_pool_t *);
 TCN_ALLOC_CSTRING(hostname);
+char *sp = NULL;
+int   scope_id = 0;
 apr_sockaddr_t *sa = NULL;
 apr_sockaddr_t *sl = NULL;
 apr_int32_t f;
@@ -36,6 +38,16 @@ TCN_IMPLEMENT_CALL(jlong, Address, info)
 
 UNREFERENCED(o);
 GET_S_FAMILY(f, family);
+#if APR_HAVE_IPV6
+if (hostname) {
+/* XXX: This only works for real scope_id's
+ */
+if ((sp = strchr(J2S(hostname), '%'))) {
+*sp++ = '\0';
+scope_id = atoi(sp);
+}
+}
+#endif
 TCN_THROW_IF_ERR(apr_sockaddr_info_get(&sa,
 J2S(hostname), f, (apr_port_t)port,
 (apr_int32_t)flags, p), sa);
@@ -58,6 +70,13 @@ TCN_IMPLEMENT_CALL(jlong, Address, info)
 sl = sa;
 }
 }
+if (sp) {
+/* Set the provided scope id
+ * APR lack the api for setting this directly so lets presume
+ * the sin6_scope_id is present everywhere
+ */
+sl->sa.sin6.sin6_scope_id = scope_id;
+}
 #endif
 
 cleanup:

Modified: tomcat/native/branches/1.1.x/xdocs/miscellaneous/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/xdocs/miscellaneous/changelog.xml?rev=1291760&r1=1291759&r2=1291760&view=diff
==
--- tomcat/native/branches/1.1.x/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/native/branches/1.1.x/xdocs/miscellaneous/changelog.xml Tue Feb 21 
13:15:42 2012
@@ -38,6 +38,9 @@
 
 
   
+
+  52717: Set scope_id for IPv6 addresses if provided. (mturk)
+
 
   50570: Allow explicit use of FIPS mode in APR lifecycle 
listener (native support only in this update; Java support to follow). Based 
upon a patch from Chris Beckey. (schultz)
 



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



DO NOT REPLY [Bug 52717] APR endpoint doesn't handle IPv6 link-local addresses well

2012-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52717

Mladen Turk  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #1 from Mladen Turk  2012-02-21 13:20:11 UTC ---
Fixed with r1291760 by allowing to have numeric %scope_id address suffix.
Since APR does not provide API for parsing the scope/zone id from interface
name, providing exact numeric id is the only possible solution at this moment.

Tested with my local link address
address="fe80::a00:27ff:fe1b:37f0%2" for http connector does not throw bind
exceptions any more.

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

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



svn commit: r1291769 - in /tomcat/site/trunk: docs/doap_Tomcat.rdf docs/index.html docs/migration-7.html docs/oldnews.html xdocs/doap_Tomcat.rdf xdocs/index.xml xdocs/migration-7.xml xdocs/oldnews.xml

2012-02-21 Thread kkolinko
Author: kkolinko
Date: Tue Feb 21 13:28:24 2012
New Revision: 1291769

URL: http://svn.apache.org/viewvc?rev=1291769&view=rev
Log:
Correct version in Changelog link on the main page.
Several minor tweaks wrt new release.

Modified:
tomcat/site/trunk/docs/doap_Tomcat.rdf
tomcat/site/trunk/docs/index.html
tomcat/site/trunk/docs/migration-7.html
tomcat/site/trunk/docs/oldnews.html
tomcat/site/trunk/xdocs/doap_Tomcat.rdf
tomcat/site/trunk/xdocs/index.xml
tomcat/site/trunk/xdocs/migration-7.xml
tomcat/site/trunk/xdocs/oldnews.xml

Modified: tomcat/site/trunk/docs/doap_Tomcat.rdf
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/doap_Tomcat.rdf?rev=1291769&r1=1291768&r2=1291769&view=diff
==
--- tomcat/site/trunk/docs/doap_Tomcat.rdf (original)
+++ tomcat/site/trunk/docs/doap_Tomcat.rdf Tue Feb 21 13:28:24 2012
@@ -55,8 +55,8 @@
 
   
 Latest Stable 7.0.x Release
-2012-01-21
-7.0.25
+2012-02-21
+7.0.26
   
 
 

Modified: tomcat/site/trunk/docs/index.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/index.html?rev=1291769&r1=1291768&r2=1291769&view=diff
==
--- tomcat/site/trunk/docs/index.html (original)
+++ tomcat/site/trunk/docs/index.html Tue Feb 21 13:28:24 2012
@@ -266,7 +266,7 @@ Full details of these changes, and all t
 
 
 Download |
-ChangeLog for 7.0.25
+ChangeLog for 7.0.26
 
 
 

Modified: tomcat/site/trunk/docs/migration-7.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/migration-7.html?rev=1291769&r1=1291768&r2=1291769&view=diff
==
--- tomcat/site/trunk/docs/migration-7.html (original)
+++ tomcat/site/trunk/docs/migration-7.html Tue Feb 21 13:28:24 2012
@@ -1110,8 +1110,8 @@ of Apache Tomcat.
 You can also use Subversion command similar to the following (all on one 
line):
 
   svn diff
-
--old=http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_22/conf/
-
--new=http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_23/conf/
+
--old=http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_25/conf/
+
--new=http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_26/conf/
 
   
 

Modified: tomcat/site/trunk/docs/oldnews.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/oldnews.html?rev=1291769&r1=1291768&r2=1291769&view=diff
==
--- tomcat/site/trunk/docs/oldnews.html (original)
+++ tomcat/site/trunk/docs/oldnews.html Tue Feb 21 13:28:24 2012
@@ -212,14 +212,14 @@ compared to version 7.0.23. The notable 
 
 
 Full details of these changes, and all the other changes, are available in the
-Tomcat 7 changelog.
+Tomcat 7 
changelog.
 
 
 
 
 
 Download |
-ChangeLog for 7.0.25
+ChangeLog for 
7.0.25
 
 
 

Modified: tomcat/site/trunk/xdocs/doap_Tomcat.rdf
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/doap_Tomcat.rdf?rev=1291769&r1=1291768&r2=1291769&view=diff
==
--- tomcat/site/trunk/xdocs/doap_Tomcat.rdf (original)
+++ tomcat/site/trunk/xdocs/doap_Tomcat.rdf Tue Feb 21 13:28:24 2012
@@ -55,8 +55,8 @@
 
   
 Latest Stable 7.0.x Release
-2012-01-21
-7.0.25
+2012-02-21
+7.0.26
   
 
 

Modified: tomcat/site/trunk/xdocs/index.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/index.xml?rev=1291769&r1=1291768&r2=1291769&view=diff
==
--- tomcat/site/trunk/xdocs/index.xml (original)
+++ tomcat/site/trunk/xdocs/index.xml Tue Feb 21 13:28:24 2012
@@ -57,7 +57,7 @@ Full details of these changes, and all t
 
 
 Download |
-ChangeLog for 7.0.25
+ChangeLog for 7.0.26
 
 
 

Modified: tomcat/site/trunk/xdocs/migration-7.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/migration-7.xml?rev=1291769&r1=1291768&r2=1291769&view=diff
==
--- tomcat/site/trunk/xdocs/migration-7.xml (original)
+++ tomcat/site/trunk/xdocs/migration-7.xml Tue Feb 21 13:28:24 2012
@@ -448,8 +448,8 @@ of Apache Tomcat.
 
 You can also use Subversion command similar to the following (all on 
one line):
   svn diff
-
--old=http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_22/conf/
-
--new=http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_23/conf/
+
--old=http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_25/conf/
+
--new=http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_26/conf/
 
   
   

Modified: tomcat/site/trunk/xdocs/oldnews.xml
URL: 
http://svn.apache.o

Re: svn commit: r1291769 - in /tomcat/site/trunk: docs/doap_Tomcat.rdf docs/index.html docs/migration-7.html docs/oldnews.html xdocs/doap_Tomcat.rdf xdocs/index.xml xdocs/migration-7.xml xdocs/oldnews

2012-02-21 Thread Konstantin Kolinko
2012/2/21  :
> Author: kkolinko
> Date: Tue Feb 21 13:28:24 2012
> New Revision: 1291769
>
> URL: http://svn.apache.org/viewvc?rev=1291769&view=rev
> Log:
> Correct version in Changelog link on the main page.
> Several minor tweaks wrt new release.
>
> Modified:
>    tomcat/site/trunk/docs/doap_Tomcat.rdf
>    tomcat/site/trunk/docs/index.html
>    tomcat/site/trunk/docs/migration-7.html
>    tomcat/site/trunk/docs/oldnews.html
>    tomcat/site/trunk/xdocs/doap_Tomcat.rdf
>    tomcat/site/trunk/xdocs/index.xml
>    tomcat/site/trunk/xdocs/migration-7.xml
>    tomcat/site/trunk/xdocs/oldnews.xml

I see that live site was not updated yet,
so I did not do svn up.

The documentation symlink still points to 7.0.25.


I added version to Bugzilla.

Looking at the mirrors at
http://www.apache.org/mirrors/
average mirror age is 5-6 hours, so it is worth waiting for 2 hours more.

Best regards,
Konstantin Kolinko

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



Re: svn commit: r1291760 - in /tomcat/native/branches/1.1.x: native/src/address.c xdocs/miscellaneous/changelog.xml

2012-02-21 Thread Konstantin Kolinko
2012/2/21  :
> Author: mturk
> Date: Tue Feb 21 13:15:42 2012
> New Revision: 1291760
>
> URL: http://svn.apache.org/viewvc?rev=1291760&view=rev
> Log:
> Fix BZ52717 by allowing to have %scope_id as address suffix for local-link 
> IPv6 addresses
>
> Modified:
>    tomcat/native/branches/1.1.x/native/src/address.c
>    tomcat/native/branches/1.1.x/xdocs/miscellaneous/changelog.xml
>
> Modified: tomcat/native/branches/1.1.x/native/src/address.c
> URL: 
> http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/native/src/address.c?rev=1291760&r1=1291759&r2=1291760&view=diff
> ==
> --- tomcat/native/branches/1.1.x/native/src/address.c (original)
> +++ tomcat/native/branches/1.1.x/native/src/address.c Tue Feb 21 13:15:42 2012
> @@ -29,6 +29,8 @@ TCN_IMPLEMENT_CALL(jlong, Address, info)
>  {
>     apr_pool_t *p = J2P(pool, apr_pool_t *);
>     TCN_ALLOC_CSTRING(hostname);
> +    char *sp = NULL;
> +    int   scope_id = 0;
>     apr_sockaddr_t *sa = NULL;
>     apr_sockaddr_t *sl = NULL;
>     apr_int32_t f;
> @@ -36,6 +38,16 @@ TCN_IMPLEMENT_CALL(jlong, Address, info)
>
>     UNREFERENCED(o);
>     GET_S_FAMILY(f, family);
> +#if APR_HAVE_IPV6
> +    if (hostname) {
> +        /* XXX: This only works for real scope_id's
> +         */
> +        if ((sp = strchr(J2S(hostname), '%'))) {
> +            *sp++ = '\0';
> +            scope_id = atoi(sp);
> +        }
> +    }
> +#endif
>     TCN_THROW_IF_ERR(apr_sockaddr_info_get(&sa,
>             J2S(hostname), f, (apr_port_t)port,
>             (apr_int32_t)flags, p), sa);
> @@ -58,6 +70,13 @@ TCN_IMPLEMENT_CALL(jlong, Address, info)
>             sl = sa;
>         }
>     }
> +    if (sp) {
> +        /* Set the provided scope id
> +         * APR lack the api for setting this directly so lets presume
> +         * the sin6_scope_id is present everywhere
> +         */
> +        sl->sa.sin6.sin6_scope_id = scope_id;

Maybe guard the above with #if APR_HAVE_IPV6 , like the first code
fragment in this patch?   I do not know what "sa.sin6" is and when it
is available, but it will lessen the chance of bumping into useless
compilation error here on an ip4-only system.

I wonder when this change will be ported to native/trunk. (Just
wondering. No real interest though).

> +    }
>  #endif
>
>  cleanup:
>
> Modified: tomcat/native/branches/1.1.x/xdocs/miscellaneous/changelog.xml
> URL: 
> http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/xdocs/miscellaneous/changelog.xml?rev=1291760&r1=1291759&r2=1291760&view=diff
> ==
> --- tomcat/native/branches/1.1.x/xdocs/miscellaneous/changelog.xml (original)
> +++ tomcat/native/branches/1.1.x/xdocs/miscellaneous/changelog.xml Tue Feb 21 
> 13:15:42 2012
> @@ -38,6 +38,9 @@
>  
>  
>   
> +    
> +      52717: Set scope_id for IPv6 addresses if provided. (mturk)
> +    
>     
>       50570: Allow explicit use of FIPS mode in APR lifecycle 
> listener (native support only in this update; Java support to follow). Based 
> upon a patch from Chris Beckey. (schultz)
>     
>

Best regards,
Konstantin Kolinko

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



Re: svn commit: r1291760 - in /tomcat/native/branches/1.1.x: native/src/address.c xdocs/miscellaneous/changelog.xml

2012-02-21 Thread Mladen Turk

On 02/21/2012 03:06 PM, Konstantin Kolinko wrote:

2012/2/21:

@@ -58,6 +70,13 @@ TCN_IMPLEMENT_CALL(jlong, Address, info)
 sl = sa;
 }
 }
+if (sp) {
+/* Set the provided scope id
+ * APR lack the api for setting this directly so lets presume
+ * the sin6_scope_id is present everywhere
+ */
+sl->sa.sin6.sin6_scope_id = scope_id;


Maybe guard the above with #if APR_HAVE_IPV6 , like the first code
fragment in this patch?


Check the full code not just patch. It is inside APR_HAVE_IPV6


Regards
--
^TM

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



Re: svn commit: r1291760 - in /tomcat/native/branches/1.1.x: native/src/address.c xdocs/miscellaneous/changelog.xml

2012-02-21 Thread Mladen Turk

On 02/21/2012 03:06 PM, Konstantin Kolinko wrote:

2012/2/21:

I wonder when this change will be ported to native/trunk. (Just
wondering. No real interest though).



We currently have only 1.x release which is from this branch.
Trunk will be 2.x and will require apr-2.x
I plan to add support for scope_id directly inside APR so trunk
will have different code.


Regards
--
^TM

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



Re: svn commit: r1291760 - in /tomcat/native/branches/1.1.x: native/src/address.c xdocs/miscellaneous/changelog.xml

2012-02-21 Thread Konstantin Kolinko
2012/2/21 Mladen Turk :
> On 02/21/2012 03:06 PM, Konstantin Kolinko wrote:
>>
>> 2012/2/21:
>>
>>> @@ -58,6 +70,13 @@ TCN_IMPLEMENT_CALL(jlong, Address, info)
>>>             sl = sa;
>>>         }
>>>     }
>>> +    if (sp) {
>>> +        /* Set the provided scope id
>>> +         * APR lack the api for setting this directly so lets presume
>>> +         * the sin6_scope_id is present everywhere
>>> +         */
>>> +        sl->sa.sin6.sin6_scope_id = scope_id;
>>
>>
>> Maybe guard the above with #if APR_HAVE_IPV6 , like the first code
>> fragment in this patch?
>
>
> Check the full code not just patch. It is inside APR_HAVE_IPV6
>

Oh, yes. Indeed.

Best regards,
Konstantin Kolinko

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



Re: [GUMP@vmgump]: Project tomcat-trunk-test (in module tomcat-trunk) failed

2012-02-21 Thread Konstantin Kolinko
Note that Buildbot fails as well.

The error is in TestWebSocket,
[[[
Testcase: testSimple took 3.875 sec
FAILED
null
junit.framework.AssertionFailedError
at 
org.apache.catalina.websocket.TestWebSocket.readMessage(TestWebSocket.java:149)
at 
org.apache.catalina.websocket.TestWebSocket.testSimple(TestWebSocket.java:95)
]]]

The code at readMessage() is:

147 // Get payload length
148 int len = is.read() & 0x7F;
149 assertTrue(len < 126);

>From debugging the len value on line 148 is 126.

In writeMessage() method the len value was 3.

Best regards,
Konstantin Kolinko

2012/2/21 Bill Barker :
> To whom it may engage...
>
> This is an automated request, but not an unsolicited one. For
> more information please visit http://gump.apache.org/nagged.html,
> and/or contact the folk at gene...@gump.apache.org.
>
> Project tomcat-trunk-test has an issue affecting its community integration.
> This issue affects 1 projects.
> The current state of this project is 'Failed', with reason 'Build Failed'.
> For reference only, the following projects are affected by this:
>    - tomcat-trunk-test :  Tomcat 8.x, a web server implementing Java Servlet 
> 3.1,
>    ...
>
>
> Full details are available at:
>    
> http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test/index.html
>
> That said, some information snippets are provided here.
>
> The following annotations (debug/informational/warning/error messages) were 
> provided:
>  -DEBUG- Dependency on tomcat-trunk-dbcp exists, no need to add for property 
> tomcat-dbcp-src.jar.
>  -DEBUG- Dependency on commons-daemon exists, no need to add for property 
> commons-daemon.native.src.tgz.
>  -DEBUG- Dependency on commons-daemon exists, no need to add for property 
> tomcat-native.tar.gz.
>  -DEBUG- Dependency on tomcat-trunk-dbcp exists, no need to add for property 
> tomcat-dbcp.home.
>  -INFO- Failed with reason build failed
>  -INFO- Project Reports in: 
> /srv/gump/public/workspace/tomcat-trunk/output/build/logs
>
>
>
> The following work was performed:
> http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test/gump_work/build_tomcat-trunk_tomcat-trunk-test.html
> Work Name: build_tomcat-trunk_tomcat-trunk-test (Type: Build)
> Work ended in a state of : Failed
> Elapsed: 21 mins 15 secs
> Command Line: /usr/lib/jvm/java-6-openjdk/bin/java -Djava.awt.headless=true 
> -Dbuild.sysclasspath=only org.apache.tools.ant.Main 
> -Dgump.merge=/srv/gump/public/gump/work/merge.xml 
> -Djunit.jar=/srv/gump/public/workspace/junit/dist/junit-21022012.jar 
> -Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-21022012-native-src.tar.gz
>  
> -Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-21022012-native-src.tar.gz
>  -Dexamples.sources.skip=true 
> -Dtomcat-dbcp.home=/srv/gump/public/workspace/tomcat-trunk/tomcat-deps 
> -Djdt.jar=/srv/gump/packages/eclipse/plugins/org.eclipse.jdt.core_3.4.2/jdtcore.jar
>  
> -Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-21022012.jar
>  
> -Dtomcat-dbcp-src.jar=/srv/gump/public/workspace/tomcat-trunk/tomcat-deps/tomcat-dbcp-src.jar
>  -Dtest.accesslog=true 
> -Dcommons-pool.home=/srv/gump/public/workspace/commons-pool-1.x 
> -Dcommons-dbcp.home=/
>  srv/gump/public/workspace/commons-dbcp-1.x 
> -Dtomcat-dbcp.jar=/srv/gump/public/workspace/tomcat-trunk/tomcat-deps/tomcat-dbcp-21022012.jar
>  test
> [Working Directory: /srv/gump/public/workspace/tomcat-trunk]
> CLASSPATH: 
> /usr/lib/jvm/java-6-openjdk/lib/tools.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-trunk/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/servlet-api.jar:/srv/gump/public/workspace/tomcat-trunk/outp
>  ut/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-trunk/output

[GUMP@vmgump]: Project tomcat-trunk-test (in module tomcat-trunk) failed

2012-02-21 Thread Bill Barker
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at gene...@gump.apache.org.

Project tomcat-trunk-test has an issue affecting its community integration.
This issue affects 1 projects.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-trunk-test :  Tomcat 8.x, a web server implementing Java Servlet 
3.1,
...


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on tomcat-trunk-dbcp exists, no need to add for property 
tomcat-dbcp-src.jar.
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
commons-daemon.native.src.tgz.
 -DEBUG- Dependency on commons-daemon exists, no need to add for property 
tomcat-native.tar.gz.
 -DEBUG- Dependency on tomcat-trunk-dbcp exists, no need to add for property 
tomcat-dbcp.home.
 -INFO- Failed with reason build failed
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-trunk/output/build/logs



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test/gump_work/build_tomcat-trunk_tomcat-trunk-test.html
Work Name: build_tomcat-trunk_tomcat-trunk-test (Type: Build)
Work ended in a state of : Failed
Elapsed: 21 mins 6 secs
Command Line: /usr/lib/jvm/java-6-openjdk/bin/java -Djava.awt.headless=true 
-Dbuild.sysclasspath=only org.apache.tools.ant.Main 
-Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Djunit.jar=/srv/gump/public/workspace/junit/dist/junit-21022012.jar 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-21022012-native-src.tar.gz
 
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-21022012-native-src.tar.gz
 -Dexamples.sources.skip=true 
-Dtomcat-dbcp.home=/srv/gump/public/workspace/tomcat-trunk/tomcat-deps 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/org.eclipse.jdt.core_3.4.2/jdtcore.jar
 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-21022012.jar
 
-Dtomcat-dbcp-src.jar=/srv/gump/public/workspace/tomcat-trunk/tomcat-deps/tomcat-dbcp-src.jar
 -Dtest.accesslog=true 
-Dcommons-pool.home=/srv/gump/public/workspace/commons-pool-1.x 
-Dcommons-dbcp.home=/
 srv/gump/public/workspace/commons-dbcp-1.x 
-Dtomcat-dbcp.jar=/srv/gump/public/workspace/tomcat-trunk/tomcat-deps/tomcat-dbcp-21022012.jar
 test 
[Working Directory: /srv/gump/public/workspace/tomcat-trunk]
CLASSPATH: 
/usr/lib/jvm/java-6-openjdk/lib/tools.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-trunk/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/servlet-api.jar:/srv/gump/public/workspace/tomcat-trunk/outp
 
ut/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-util.jar:/srv/gump/packages/javamail-1.4/mail.jar:/srv/gump/packages/javamail-1.4/lib/mailapi.jar:/srv/gump/packages/jaf-1.1ea/activation.jar:/srv/gump/packages/eclipse/plugins/org.eclipse.jdt.core_3.4.2/jdtcore.jar:/srv/gump/public/workspace/tomcat-tr
 
unk/tomcat-deps/tomcat-dbcp-21022012.jar:/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-21022012.jar:/srv/gump/public/workspace/junit/dist/junit-21022012.ja

Release Tomcat Native 1.1.23

2012-02-21 Thread Mladen Turk

Hi,

We have couple of bugs fixed and its been quite a while since 1.1.22.
There is also few trivial bugs and patches in BZ which I plan to solve.
I volunteer as RM for 1.1.23.

Objections, comments?


Regards
--
^TM

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



Re: svn commit: r1291507 - in /tomcat/trunk/java/org/apache/catalina/websocket: StreamInbound.java WsInputStream.java WsOutbound.java

2012-02-21 Thread Konstantin Kolinko
2012/2/21  :
> Author: markt
> Date: Mon Feb 20 22:54:13 2012
> New Revision: 1291507
>
> URL: http://svn.apache.org/viewvc?rev=1291507&view=rev
> Log:
> Ping/pong support
>
> Modified:
>    tomcat/trunk/java/org/apache/catalina/websocket/StreamInbound.java
>    tomcat/trunk/java/org/apache/catalina/websocket/WsInputStream.java
>    tomcat/trunk/java/org/apache/catalina/websocket/WsOutbound.java
>
> Modified: tomcat/trunk/java/org/apache/catalina/websocket/StreamInbound.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/websocket/StreamInbound.java?rev=1291507&r1=1291506&r2=1291507&view=diff
>

Regarding StreamInbound#doClose(), doPing(), doPong()

1. in doClose():
status = status + is.read();
There is no check whether is.read() is not -1 above.

2.All 3 methods have such loops:
while (read > -1) {
data.position(data.position() + read);
read = is.read(data.array(), data.position(), data.remaining());
}

I am not sure what happens if data.remaining() becomes 0 but there are
still data in the stream, e.g. from ill-intended client.  I think that
if there is more data than buffer can handle it will hang looping
indefinitely with read=0.

3. doPong() method has unbounded while() loop. It wouldn't hang, but I
think it is bad that there is no control on how many data are
consumed.

Best regards,
Konstantin Kolinko

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



Re: AccessLogValve enhancement

2012-02-21 Thread Christopher Schultz
Mark,

On 2/19/12 12:49 PM, Mark Thomas wrote:
> On 19/02/2012 17:20, Christopher Schultz wrote:
>> Philosophically, I'm not really sure why the flexibility of a 
>> full-featured logging system (JULI, log4j, etc.) is required for
>> access logging: there's not much opportunity to use all the
>> features they provide (log level filtering, log-message aggregation
>> to log files and log-file multiplexing/splitting). Access logs
>> typically log one thing (accesses), log it all the time, and always
>> write to the same log file.
> 
>> I'm not adverse to the patch, I just don't really see a need for
>> it.
> 
> I was coming from the "I'd rather not maintain a bunch of code to
> solve a problem that the logging frameworks have already solved
> (threading, roll-over, output to multiple destinations)" angle.

That's something I hadn't really thought about, honestly. It's one of
the best reasons to use a logging framework IMO.

I'd like to see some performance metrics, though, since putting a
fully-fledged logging framework in the middle here has a distinct
possibility of slowing everything down (for every request, of course). I
kind of like Konstantin's idea of building extension-points into the
AccessLogValve to allow a particular implementation of the Valve to
handle the physical logging aspects while the AccessLogValve itself
takes care of actually generating and emitting the log messages. That
way, users can get the best of both worlds.

> You know me, always happy to delete some code from the Tomcat code
> base.

Amen, brother.

Multiple implementations certainly doesn't lead to that end, but we'll
see how things shake out.

> My main point is that it is something worthy of discussion. And that
> is what we are doing.

Absolutely.

-chris



signature.asc
Description: OpenPGP digital signature


svn commit: r1291904 - in /tomcat/native/branches/1.1.x: native/build/tcnative.m4 xdocs/miscellaneous/changelog.xml

2012-02-21 Thread mturk
Author: mturk
Date: Tue Feb 21 16:39:21 2012
New Revision: 1291904

URL: http://svn.apache.org/viewvc?rev=1291904&view=rev
Log:
Fix BZ52119 and add support for Java7 and Java8

Modified:
tomcat/native/branches/1.1.x/native/build/tcnative.m4
tomcat/native/branches/1.1.x/xdocs/miscellaneous/changelog.xml

Modified: tomcat/native/branches/1.1.x/native/build/tcnative.m4
URL: 
http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/native/build/tcnative.m4?rev=1291904&r1=1291903&r2=1291904&view=diff
==
--- tomcat/native/branches/1.1.x/native/build/tcnative.m4 (original)
+++ tomcat/native/branches/1.1.x/native/build/tcnative.m4 Tue Feb 21 16:39:21 
2012
@@ -84,13 +84,13 @@ AC_DEFUN(
 
   # This stuff works if the command line parameter --with-java-home was
   # specified, so it takes priority rightfully.
-  
+
   tempval=${withval}
 
   if test ! -d "${tempval}" ; then
   AC_MSG_ERROR(Not a directory: ${tempval})
   fi
-  
+
   JAVA_HOME=${tempval}
   AC_MSG_RESULT(${JAVA_HOME})
 ],
@@ -117,25 +117,28 @@ AC_DEFUN(
   # JAVA_PLATFORM
   AC_MSG_CHECKING([Try to guess JDK location])
 
-  for JAVA_PREFIX in /usr/local /usr/local/lib /usr /usr/lib /opt 
/usr/java /System/Library/Frameworks/JavaVM.framework/Versions/ ; do
-
-for JAVA_PLATFORM in 6 5 4 3 2 ; do
-
-  for subversion in .9 .8 .7 .6 .5 .4 .3 .2 .1 .0 "" ; do
-
-for VARIANT in IBMJava2- java java- jdk jdk- ""; do
+  for JAVA_PREFIX in /usr/local /usr/local/lib /usr /usr/lib /opt 
/usr/java /System/Library/Frameworks/JavaVM.framework/Versions
+  do
+for JAVA_PLATFORM in 8 7 6 5 4 3 2
+do
+  for subversion in .9 .8 .7 .6 .5 .4 .3 .2 .1 .0 ""
+  do
+for VARIANT in IBMJava2- diablo-jdk java java- jdk jdk- ""
+do
   GUESS="${JAVA_PREFIX}/${VARIANT}1.${JAVA_PLATFORM}${subversion}"
-dnl   AC_MSG_CHECKING([${GUESS}])
-  if test -d "${GUESS}/bin" & test -d "${GUESS}/include" ; then
+  if test -d "${GUESS}/bin" & test -d "${GUESS}/include"
+  then
 JAVA_HOME="${GUESS}"
 AC_MSG_RESULT([${GUESS}])
 break
   fi
-  if test -d "${GUESS}/Commands" & test -d "${GUESS}/Headers" ; 
then
+  if test -d "${GUESS}/Commands" & test -d "${GUESS}/Headers"
+  then
 JAVA_HOME="${GUESS}"
 AC_MSG_RESULT([${GUESS}])
 break
   fi
+
 done
 
 if test -n "${JAVA_HOME}" ; then
@@ -211,7 +214,7 @@ AC_DEFUN(
 
 JAVA_OS = ${tempval}
   ],
-  [   
+  [
 AC_MSG_CHECKING(os_type directory)
 JAVA_OS=NONE
 if test -f ${JAVA_HOME}/${JAVA_INC}/jni_md.h; then
@@ -354,7 +357,7 @@ case "$use_openssl" in
 saved_libs="$LIBS"
 CFLAGS="$CFLAGS $TCN_OPENSSL_INC"
 LIBS="$LIBS $TCN_OPENSSL_LIBS"
- 
+
 AC_ARG_ENABLE(openssl-version-check,
 [AC_HELP_STRING([--enable-openssl-version-check],
 [Check OpenSSL Version @<:@default=yes@:>@])])

Modified: tomcat/native/branches/1.1.x/xdocs/miscellaneous/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/xdocs/miscellaneous/changelog.xml?rev=1291904&r1=1291903&r2=1291904&view=diff
==
--- tomcat/native/branches/1.1.x/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/native/branches/1.1.x/xdocs/miscellaneous/changelog.xml Tue Feb 21 
16:39:21 2012
@@ -39,6 +39,10 @@
 
   
 
+  52119: Autodetect Diablo JDK on FreeBSD and Java7+. Based 
upon a patch
+  from Michael Osipov. (mturk)
+
+
   52717: Set scope_id for IPv6 addresses if provided. (mturk)
 
 



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



DO NOT REPLY [Bug 52119] Add Diablo JDK to default JDK location search path

2012-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52119

Mladen Turk  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #2 from Mladen Turk  2012-02-21 16:40:06 UTC ---
Patch applied together with support for Java7 and Java8 beside Diablo JDK.
Thanks!

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

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



DO NOT REPLY [Bug 51197] sendError/sendRedirect don't work with AsyncContext

2012-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=51197

--- Comment #7 from Christopher Schultz  
2012-02-21 16:48:05 UTC ---
Konstantin,

(In reply to comment #5)
> The
> URLConnection used to implement getUrl() cannot read content if response code
> is >= 400.If I remove status code check in TomcatBaseTest#getUrl() to always
> read response text regardless of status code, it just fails with an
> IOException:

You have to use URLConnection.getErrorStream if the response code is
"problematic". I have this code in a class that fetches data from an HTTP
server:

int responseCode = conn.getResponseCode();

boolean error = 5 == responseCode / 100
|| 4 == responseCode / 100;

if(error)
in = new BufferedInputStream(conn.getErrorStream());
else
in = new BufferedInputStream(conn.getInputStream());

Then I just use "in" as I please.

> Caused by: java.io.IOException: Server returned HTTP response code: 400 for
> URL: http://localhost:3596/asyncErrorServlet
> at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436)
> at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379)
> at
> org.apache.catalina.startup.TomcatBaseTest.getUrl(TomcatBaseTest.java:232)
> ]]]

Weird that it's throwing an exception from getResponseCode. What JRE are you
using?

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

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



[Tomcat Wiki] Trivial Update of "FAQ/KnownIssues" by Jörgen Rydenius

2012-02-21 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The "FAQ/KnownIssues" page has been changed by Jörgen Rydenius:
http://wiki.apache.org/tomcat/FAQ/KnownIssues?action=diff&rev1=8&rev2=9

Comment:
Added some version info about PD4ML.

  
  '''Are there any other corresponding cases of this bug?'''
  
- The PDF generating software module PD4ML has had a corresponding problem when 
calling the render() methods in class org.zefer.pd4ml.PD4ML with 
response.getOutputStream() as argument. That causes the response stream to be 
closed from a finalizer() method of a class called PD4Device. When using an 
Apache/Tomcat connector, this unexpected stream close from the finalizer thread 
has occationally caused responses to be sent to wrong requestor 
(request/response mix up). The workarounds described above for ImageIO works 
perfectly in this case too. A general way to protect the response output 
streams from misbehaving web applications is to set the system property 
org.apache.catalina.connector.RECYCLE_FACADES=true, since that makes Tomcat 
create new stream instances for each request (of course at the cost of 
performance).
+ The third party PDF generating software module PD4ML has had a corresponding 
problem when calling the render() methods in class org.zefer.pd4ml.PD4ML with 
response.getOutputStream() as argument. That causes the response stream to be 
closed from a finalizer() method of a class called PD4Device. When using an 
Apache/Tomcat connector, this unexpected stream close from the finalizer thread 
has occationally caused responses to be sent to wrong requestor 
(request/response mix up). The workarounds described above for ImageIO works 
perfectly in this case too. A general way to protect the response output 
streams from misbehaving web applications is to set the system property 
org.apache.catalina.connector.RECYCLE_FACADES=true, since that makes Tomcat 
create new stream instances for each request (of course at the cost of 
performance).
  <>
  <>
- PD4ML has fixed this bug in their latest releases, but sites using older 
versions of the library can still be affected.
+ PD4ML has fixed this bug in their latest releases, but sites using older 
versions of the library can still be affected. PD4ML version 3.2.3 definitely 
has this behavior, but the currently latest version 3.8.0 is fixed. The release 
notes gives no clues where in between the problem was fixed and the vendor was 
not able to tell either in 
[[http://pd4ml.com/support/pdf-generation-troubleshooting-f4/pd4device-finalize-closes-output-stream-and-causes-mixup-t543.html|this
 bug report]].
  

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



Re: Release Tomcat Native 1.1.23

2012-02-21 Thread Christopher Schultz
Mladen,

On 2/21/12 11:30 AM, Mladen Turk wrote:
> We have couple of bugs fixed and its been quite a while since 1.1.22.
> There is also few trivial bugs and patches in BZ which I plan to solve.
> I volunteer as RM for 1.1.23.
> 
> Objections, comments?

I'd certainly like a release: the first release of the native component
for FIPS support is in there.

Thanks,
-chris



signature.asc
Description: OpenPGP digital signature


svn commit: r1291927 - /tomcat/maven-plugin/trunk/pom.xml

2012-02-21 Thread olamy
Author: olamy
Date: Tue Feb 21 17:15:53 2012
New Revision: 1291927

URL: http://svn.apache.org/viewvc?rev=1291927&view=rev
Log:
upgrade to 7.0.26

Modified:
tomcat/maven-plugin/trunk/pom.xml

Modified: tomcat/maven-plugin/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/pom.xml?rev=1291927&r1=1291926&r2=1291927&view=diff
==
--- tomcat/maven-plugin/trunk/pom.xml (original)
+++ tomcat/maven-plugin/trunk/pom.xml Tue Feb 21 17:15:53 2012
@@ -66,7 +66,7 @@
 2001
 
 2008
-7.0.25
+7.0.26
   
 
   



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



svn commit: r1291928 - /tomcat/maven-plugin/trunk/pom.xml

2012-02-21 Thread olamy
Author: olamy
Date: Tue Feb 21 17:16:01 2012
New Revision: 1291928

URL: http://svn.apache.org/viewvc?rev=1291928&view=rev
Log:
some upgrade on maven artifacts

Modified:
tomcat/maven-plugin/trunk/pom.xml

Modified: tomcat/maven-plugin/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/pom.xml?rev=1291928&r1=1291927&r2=1291928&view=diff
==
--- tomcat/maven-plugin/trunk/pom.xml (original)
+++ tomcat/maven-plugin/trunk/pom.xml Tue Feb 21 17:16:01 2012
@@ -389,7 +389,7 @@
   
 org.apache.maven.wagon
 wagon-provider-api
-1.0
+2.2
   
   
 org.apache.maven
@@ -513,7 +513,7 @@
 
   org.apache.maven.plugins
   maven-surefire-plugin
-  2.11
+  2.12
 
 
   org.apache.maven.plugins
@@ -537,13 +537,6 @@
   org.apache.maven.plugins
   maven-deploy-plugin
   2.5
-  
-
-  org.apache.maven.wagon
-  wagon-ssh
-  2.0
-
-  
 
 
   org.apache.maven.plugins
@@ -566,7 +559,7 @@
 
   org.apache.maven.wagon
   wagon-ssh
-  2.0
+  2.2
 
   
 



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



DO NOT REPLY [Bug 51197] sendError/sendRedirect don't work with AsyncContext

2012-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=51197

--- Comment #8 from Konstantin Kolinko  2012-02-21 
17:17:06 UTC ---
(In reply to comment #7)
> You have to use URLConnection.getErrorStream if the response code is
> "problematic". I have this code in a class that fetches data from an HTTP
> server:
> 
> int responseCode = conn.getResponseCode();
> 
> boolean error = 5 == responseCode / 100
> || 4 == responseCode / 100;
> 
> if(error)
> in = new BufferedInputStream(conn.getErrorStream());
> else
> in = new BufferedInputStream(conn.getInputStream());
> 
> Then I just use "in" as I please.
> 

Thank you! Good advise.

> > Caused by: java.io.IOException: Server returned HTTP response code: 400 for
> > URL: http://localhost:3596/asyncErrorServlet
> > at
> > sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436)
> > at 
> > java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379)
> > at
> > org.apache.catalina.startup.TomcatBaseTest.getUrl(TomcatBaseTest.java:232)
> > ]]]
> 
> Weird that it's throwing an exception from getResponseCode. What JRE are you
> using?

6u31.
getResponseCode() call cashes the exception but does not return it. Then
subsequent call to getInputStream() wraps this original exception as the cause.

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

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



DO NOT REPLY [Bug 52544] tcnative-1.dll crash with RapidSSL certificate under 64bit Java

2012-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52544

--- Comment #1 from Mladen Turk  2012-02-21 17:34:46 UTC ---
This would be hard to debug without a certificates that cause a crash.
If you can provide a certificate that causes the crash I can try to debug the
issues. You can send it directly to my email if concerned about security.

Without seeing what the certificate actually is, I'm afraid we can't do much
since there were no reports of the similar issues.

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

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



Re: Release Tomcat Native 1.1.23

2012-02-21 Thread Mladen Turk

On 02/21/2012 06:05 PM, Christopher Schultz wrote:

Mladen,

On 2/21/12 11:30 AM, Mladen Turk wrote:

We have couple of bugs fixed and its been quite a while since 1.1.22.
There is also few trivial bugs and patches in BZ which I plan to solve.
I volunteer as RM for 1.1.23.

Objections, comments?


I'd certainly like a release: the first release of the native component
for FIPS support is in there.



Exactly. I'd like to test the BZ45392 and see if we can add
OCSP support as well. I'll check how the patch correlates with
the current mod_ssl which also has OCSP support and apply it
but with compile time on/off so we can exclude any instability.


Regards
--
^TM

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



DO NOT REPLY [Bug 51197] sendError/sendRedirect don't work with AsyncContext

2012-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=51197

--- Comment #9 from Christopher Schultz  
2012-02-21 19:53:33 UTC ---
(In reply to comment #8)
> getResponseCode() call [caches] the exception but does not return it. Then
> subsequent call to getInputStream() wraps this original exception as the 
> cause.

That's ... confusing behavior. Thanks for identifying that. I was hoping that
my code wouldn't still fail because of the exception's stack trace (indicating
that the exception was thrown from getResponseCode). Looks like it's
*initialized* in getResponseCode but not actually thrown until later. Weird.

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

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



DO NOT REPLY [Bug 52735] New: Request.getRemoteAddr() throw NullPointerException

2012-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52735

 Bug #: 52735
   Summary: Request.getRemoteAddr() throw NullPointerException
   Product: Tomcat 7
   Version: unspecified
  Platform: PC
Status: NEW
  Severity: major
  Priority: P2
 Component: Connectors
AssignedTo: dev@tomcat.apache.org
ReportedBy: minde@gmail.com
Classification: Unclassified


I got java.lang.NullPointerException when I am trying to call
Request.getRemoteAddr(), here is the details of the log stacks:

ERROR [-::pool-117-thread-1]Exception in supplemental table data loading
java.lang.NullPointerException
at
org.apache.coyote.http11.Http11AprProcessor.actionInternal(Http11AprProcessor.java:272)
at
org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:834)
at org.apache.coyote.Request.action(Request.java:346)
at
org.apache.catalina.connector.Request.getRemoteAddr(Request.java:1281)
at
org.apache.catalina.connector.RequestFacade.getRemoteAddr(RequestFacade.java:517)
at ...
..DataCabinetServlet$1.run(DataCabinetServlet.java:7631)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

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

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



DO NOT REPLY [Bug 52735] Request.getRemoteAddr() throw NullPointerException

2012-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52735

minde sun  changed:

   What|Removed |Added

 OS/Version||All

--- Comment #1 from minde sun  2012-02-21 20:03:36 UTC ---
I also debug this issue locally, it seems the following code is the root cause
of this null point exception:

The first line(line # 272) of the method actionInternal in class
Http11AprProcessor:

@Override
public void actionInternal(ActionCode actionCode, Object param) {

long socketRef = socket.getSocket().longValue();
.

}

For my env, socket.getSocket() is return null, not sure why. So I believe that
we need to make sure socket.getSocket() is not null before to get the
longValue, otherwise the socketRef should be default to 0.

Thanks,
Minde

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

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



DO NOT REPLY [Bug 52735] Request.getRemoteAddr() throw NullPointerException

2012-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52735

minde sun  changed:

   What|Removed |Added

 CC||minde@gmail.com

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

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



DO NOT REPLY [Bug 52735] Request.getRemoteAddr() throw NullPointerException

2012-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52735

minde sun  changed:

   What|Removed |Added

 OS/Version|All |Windows 7

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

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



DO NOT REPLY [Bug 52714] SSLProtocol with TLSv1+SSLv3 or SSLv3+TLSv1 does not work APR based Apache Tomcat Native 1.2.22

2012-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52714

mark  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |

--- Comment #3 from mark  2012-02-21 20:08:23 UTC ---
Tomcat 6.0.35 does not work with older 1.1.20 of the APR 

Feb 21, 2012 1:38:55 PM org.apache.catalina.core.AprLifecycleListener init

INFO: An older version 1.1.20 of the APR based Apache Tomcat Native library is
installed, while Tomcat recommends version greater than 1.1.22

Feb 21, 2012 1:38:55 PM org.apache.catalina.core.AprLifecycleListener init

INFO: Loaded APR based Apache Tomcat Native library 1.1.20.

Feb 21, 2012 1:38:55 PM org.apache.catalina.core.AprLifecycleListener init

INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false],
random [true].

Feb 21, 2012 1:38:55 PM org.apache.coyote.http11.Http11AprProtocol init

INFO: Initializing Coyote HTTP/1.1 on http-0.0.0.0-30221

Feb 21, 2012 1:38:55 PM org.apache.coyote.http11.Http11AprProtocol init

SEVERE: Error initializing endpoint

java.lang.Exception: An invalid value [TLSv1+SSLv3] was provided for the
SSLProtocol attribute

at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:724)

at
org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java:107)

at
org.apache.catalina.connector.Connector.initialize(Connector.java:1049)

at
org.apache.catalina.core.StandardService.initialize(StandardService.java:703)

at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:838)

at org.apache.catalina.startup.Catalina.load(Catalina.java:538)

at org.apache.catalina.startup.Catalina.load(Catalina.java:562)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

Feb 21, 2012 1:38:55 PM org.apache.catalina.core.StandardService initialize

SEVERE: Failed to initialize connector [Connector[HTTP/1.1-30222]]

LifecycleException:  Protocol handler initialization failed:
java.lang.Exception: An invalid value [TLSv1+SSLv3] was provided for the
SSLProtocol attribute

at
org.apache.catalina.connector.Connector.initialize(Connector.java:1051)

at
org.apache.catalina.core.StandardService.initialize(StandardService.java:703)

at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:838)

at org.apache.catalina.startup.Catalina.load(Catalina.java:538)

at org.apache.catalina.startup.Catalina.load(Catalina.java:562)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)



How can this be resolved..Can a intermediate fix be supplied..

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

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



DO NOT REPLY [Bug 52714] SSLProtocol with TLSv1+SSLv3 or SSLv3+TLSv1 does not work APR based Apache Tomcat Native 1.2.22

2012-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52714

Rainer Jung  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||INVALID

--- Comment #4 from Rainer Jung  2012-02-21 20:25:46 
UTC ---
Bugzilla is not a support forum. Please do not reopen this issue.
You can seek help by posting to the Tomcat users list.
Thanks.

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

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



Re: Release Tomcat Native 1.1.23

2012-02-21 Thread Costin Manolache
Is this going to be from head ? How can I get the NPN ( sslext.c ) included
?

Costin

On Tue, Feb 21, 2012 at 9:41 AM, Mladen Turk  wrote:

> On 02/21/2012 06:05 PM, Christopher Schultz wrote:
>
>> Mladen,
>>
>> On 2/21/12 11:30 AM, Mladen Turk wrote:
>>
>>> We have couple of bugs fixed and its been quite a while since 1.1.22.
>>> There is also few trivial bugs and patches in BZ which I plan to solve.
>>> I volunteer as RM for 1.1.23.
>>>
>>> Objections, comments?
>>>
>>
>> I'd certainly like a release: the first release of the native component
>> for FIPS support is in there.
>>
>>
> Exactly. I'd like to test the BZ45392 and see if we can add
> OCSP support as well. I'll check how the patch correlates with
> the current mod_ssl which also has OCSP support and apply it
> but with compile time on/off so we can exclude any instability.
>
>
>
> Regards
> --
> ^TM
>
> --**--**-
> To unsubscribe, e-mail: 
> dev-unsubscribe@tomcat.apache.**org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>


Re: [GUMP@vmgump]: Project tomcat-trunk-test (in module tomcat-trunk) failed

2012-02-21 Thread Mark Thomas
On 21/02/2012 14:49, Konstantin Kolinko wrote:
> Note that Buildbot fails as well.
> 
> The error is in TestWebSocket,
> [[[
> Testcase: testSimple took 3.875 sec
>   FAILED
> null
> junit.framework.AssertionFailedError
>   at 
> org.apache.catalina.websocket.TestWebSocket.readMessage(TestWebSocket.java:149)
>   at 
> org.apache.catalina.websocket.TestWebSocket.testSimple(TestWebSocket.java:95)
> ]]]
> 
> The code at readMessage() is:
> 
> 147   // Get payload length
> 148   int len = is.read() & 0x7F;
> 149   assertTrue(len < 126);
> 
> From debugging the len value on line 148 is 126.
> 
> In writeMessage() method the len value was 3.
> 
> Best regards,
> Konstantin Kolinko

Thanks. When I went through the code moving the calls to Buffer.flip(),
I missed a few code paths. I'm going through now double checking my logic.

Mark

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



Re: Release Tomcat Native 1.1.23

2012-02-21 Thread Rainer Jung

On 21.02.2012 21:30, Costin Manolache wrote:

Is this going to be from head ? How can I get the NPN ( sslext.c ) included
?


Mladen is aiming for 1.1.23, so he will be releasing from the 1.1.x branch.

Regards,

Rainer


On Tue, Feb 21, 2012 at 9:41 AM, Mladen Turk  wrote:


On 02/21/2012 06:05 PM, Christopher Schultz wrote:


Mladen,

On 2/21/12 11:30 AM, Mladen Turk wrote:


We have couple of bugs fixed and its been quite a while since 1.1.22.
There is also few trivial bugs and patches in BZ which I plan to solve.
I volunteer as RM for 1.1.23.

Objections, comments?



I'd certainly like a release: the first release of the native component
for FIPS support is in there.



Exactly. I'd like to test the BZ45392 and see if we can add
OCSP support as well. I'll check how the patch correlates with
the current mod_ssl which also has OCSP support and apply it
but with compile time on/off so we can exclude any instability.



Regards
--
^TM


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



Re: Release Tomcat Native 1.1.23

2012-02-21 Thread Costin Manolache
On Tue, Feb 21, 2012 at 12:51 PM, Rainer Jung wrote:

> On 21.02.2012 21:30, Costin Manolache wrote:
>
>> Is this going to be from head ? How can I get the NPN ( sslext.c )
>> included
>> ?
>>
>
> Mladen is aiming for 1.1.23, so he will be releasing from the 1.1.x branch.
>

What's the process for backporting ? The main change is adding a file, so
it should be pretty safe.

Costin


> Regards,
>
> Rainer
>
>
>  On Tue, Feb 21, 2012 at 9:41 AM, Mladen Turk  wrote:
>>
>>  On 02/21/2012 06:05 PM, Christopher Schultz wrote:
>>>
>>>  Mladen,

 On 2/21/12 11:30 AM, Mladen Turk wrote:

  We have couple of bugs fixed and its been quite a while since 1.1.22.
> There is also few trivial bugs and patches in BZ which I plan to solve.
> I volunteer as RM for 1.1.23.
>
> Objections, comments?
>
>
 I'd certainly like a release: the first release of the native component
 for FIPS support is in there.


  Exactly. I'd like to test the BZ45392 and see if we can add
>>> OCSP support as well. I'll check how the patch correlates with
>>> the current mod_ssl which also has OCSP support and apply it
>>> but with compile time on/off so we can exclude any instability.
>>>
>>>
>>>
>>> Regards
>>> --
>>> ^TM
>>>
>>
> --**--**-
> To unsubscribe, e-mail: 
> dev-unsubscribe@tomcat.apache.**org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>


DO NOT REPLY [Bug 52735] Request.getRemoteAddr() throw NullPointerException

2012-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52735

Konstantin Kolinko  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID
 OS/Version||All

--- Comment #2 from Konstantin Kolinko  2012-02-21 
21:01:13 UTC ---
(In reply to comment #0)
> at java.util.concurrent.FutureTask.run(Unknown Source)

You must not access request/response objects outside of request processing
cycle. Failing to adhere to this requirement may lead to notable security
issues.


See "System properties" page in the Configuration reference for description of
...RECYCLE_FACADES property. I strongly recommend you to set it to the value of
"true", for better security and to more easily detect misbehaving code.

If you have further questions, ask on the users mailing list. Bugzilla is not a
support forum.

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

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



[Tomcat Wiki] Trivial Update of "FAQ/KnownIssues" by Jörgen Rydenius

2012-02-21 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The "FAQ/KnownIssues" page has been changed by Jörgen Rydenius:
http://wiki.apache.org/tomcat/FAQ/KnownIssues?action=diff&rev1=9&rev2=10

  The third party PDF generating software module PD4ML has had a corresponding 
problem when calling the render() methods in class org.zefer.pd4ml.PD4ML with 
response.getOutputStream() as argument. That causes the response stream to be 
closed from a finalizer() method of a class called PD4Device. When using an 
Apache/Tomcat connector, this unexpected stream close from the finalizer thread 
has occationally caused responses to be sent to wrong requestor 
(request/response mix up). The workarounds described above for ImageIO works 
perfectly in this case too. A general way to protect the response output 
streams from misbehaving web applications is to set the system property 
org.apache.catalina.connector.RECYCLE_FACADES=true, since that makes Tomcat 
create new stream instances for each request (of course at the cost of 
performance).
  <>
  <>
- PD4ML has fixed this bug in their latest releases, but sites using older 
versions of the library can still be affected. PD4ML version 3.2.3 definitely 
has this behavior, but the currently latest version 3.8.0 is fixed. The release 
notes gives no clues where in between the problem was fixed and the vendor was 
not able to tell either in 
[[http://pd4ml.com/support/pdf-generation-troubleshooting-f4/pd4device-finalize-closes-output-stream-and-causes-mixup-t543.html|this
 bug report]].
+ PD4ML has fixed this bug in their latest releases, but sites using older 
versions of the library can still be affected. PD4ML version 3.2.3 definitely 
has this flaw, but the currently latest version 3.8.0 is fixed. The release 
notes gives no clues where in between the problem was fixed and the vendor was 
not able to tell either in 
[[http://pd4ml.com/support/pdf-generation-troubleshooting-f4/pd4device-finalize-closes-output-stream-and-causes-mixup-t543.html|this
 bug report]].
  

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



svn commit: r1292030 - in /tomcat/trunk/java/org/apache/catalina/websocket: MessageInbound.java WsOutbound.java

2012-02-21 Thread markt
Author: markt
Date: Tue Feb 21 21:13:54 2012
New Revision: 1292030

URL: http://svn.apache.org/viewvc?rev=1292030&view=rev
Log:
Fix test case failure. flip Byte/Char buffers in the right places.
Rename method since it ma be writing a binary or text message.

Modified:
tomcat/trunk/java/org/apache/catalina/websocket/MessageInbound.java
tomcat/trunk/java/org/apache/catalina/websocket/WsOutbound.java

Modified: tomcat/trunk/java/org/apache/catalina/websocket/MessageInbound.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/websocket/MessageInbound.java?rev=1292030&r1=1292029&r2=1292030&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/websocket/MessageInbound.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/websocket/MessageInbound.java Tue Feb 
21 21:13:54 2012
@@ -56,8 +56,7 @@ public abstract class MessageInbound ext
 }
 read = r.read(cb.array(), cb.position(), cb.remaining());
 }
-cb.limit(cb.position());
-cb.position(0);
+cb.flip();
 onTextMessage(cb);
 cb.clear();
 }

Modified: tomcat/trunk/java/org/apache/catalina/websocket/WsOutbound.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/websocket/WsOutbound.java?rev=1292030&r1=1292029&r2=1292030&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/websocket/WsOutbound.java (original)
+++ tomcat/trunk/java/org/apache/catalina/websocket/WsOutbound.java Tue Feb 21 
21:13:54 2012
@@ -80,7 +80,7 @@ public class WsOutbound {
 flush();
 }
 text = Boolean.FALSE;
-doWriteBinary(msgBb, true);
+doWriteBytes(msgBb, true);
 }
 
 
@@ -104,9 +104,11 @@ public class WsOutbound {
 return;
 }
 if (text.booleanValue()) {
+cb.flip();
 doWriteText(cb, finalFragment);
 } else {
-doWriteBinary(bb, finalFragment);
+bb.flip();
+doWriteBytes(bb, finalFragment);
 }
 }
 
@@ -157,7 +159,15 @@ public class WsOutbound {
 upgradeOutbound.flush();
 }
 
-protected void doWriteBinary(ByteBuffer buffer, boolean finalFragment)
+/**
+ * Writes the provided bytes as the payload in a new WebSocket frame.
+ *
+ * @param bufferThe bytes to include in the payload.
+ * @param finalFragment Do these bytes represent the final fragment of a
+ *  WebSocket message?
+ * @throws IOException
+ */
+protected void doWriteBytes(ByteBuffer buffer, boolean finalFragment)
 throws IOException {
 
 // Work out the first byte
@@ -216,13 +226,13 @@ public class WsOutbound {
 B2CConverter.UTF_8.newEncoder().encode(buffer, bb, true);
 bb.flip();
 if (buffer.hasRemaining()) {
-doWriteBinary(bb, false);
+doWriteBytes(bb, false);
 } else {
-doWriteBinary(bb, finalFragment);
+doWriteBytes(bb, finalFragment);
 }
 } while (buffer.hasRemaining());
 
-// Reset
+// Reset - bb will be cleared in doWriteBytes()
 cb.clear();
 }
 }



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



svn commit: r1292031 - /tomcat/trunk/java/org/apache/catalina/websocket/WsOutbound.java

2012-02-21 Thread markt
Author: markt
Date: Tue Feb 21 21:14:33 2012
New Revision: 1292031

URL: http://svn.apache.org/viewvc?rev=1292031&view=rev
Log:
Reduce visibility

Modified:
tomcat/trunk/java/org/apache/catalina/websocket/WsOutbound.java

Modified: tomcat/trunk/java/org/apache/catalina/websocket/WsOutbound.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/websocket/WsOutbound.java?rev=1292031&r1=1292030&r2=1292031&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/websocket/WsOutbound.java (original)
+++ tomcat/trunk/java/org/apache/catalina/websocket/WsOutbound.java Tue Feb 21 
21:14:33 2012
@@ -167,7 +167,7 @@ public class WsOutbound {
  *  WebSocket message?
  * @throws IOException
  */
-protected void doWriteBytes(ByteBuffer buffer, boolean finalFragment)
+private void doWriteBytes(ByteBuffer buffer, boolean finalFragment)
 throws IOException {
 
 // Work out the first byte
@@ -220,7 +220,7 @@ public class WsOutbound {
 }
 
 
-protected void doWriteText(CharBuffer buffer, boolean finalFragment)
+private void doWriteText(CharBuffer buffer, boolean finalFragment)
 throws IOException {
 do {
 B2CConverter.UTF_8.newEncoder().encode(buffer, bb, true);



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



Re: svn commit: r1291507 - in /tomcat/trunk/java/org/apache/catalina/websocket: StreamInbound.java WsInputStream.java WsOutbound.java

2012-02-21 Thread Mark Thomas
On 21/02/2012 16:31, Konstantin Kolinko wrote:
> Regarding StreamInbound#doClose(), doPing(), doPong()

Thanks for the review.

> 
> 1. in doClose():
> status = status + is.read();
> There is no check whether is.read() is not -1 above.

Added.

> 2.All 3 methods have such loops:
> while (read > -1) {
> data.position(data.position() + read);
> read = is.read(data.array(), data.position(), 
> data.remaining());
> }
> 
> I am not sure what happens if data.remaining() becomes 0 but there are
> still data in the stream, e.g. from ill-intended client.

This is handled by the underlying WsInputStream. It ensures that only
the number of bytes declared in the packet header may be read before EOF.

> I think that if there is more data than buffer can handle it will hang looping
> indefinitely with read=0.

Since these are all control frames the size of the payload is limited to
a maximum of 125 bytes therefore I believe we are safe here.

> 3. doPong() method has unbounded while() loop. It wouldn't hang, but I
> think it is bad that there is no control on how many data are
> consumed.

Again, the limit is 125 bytes. This is enforced by the payload length
checks in onData() above combined with the behaviour of WsInputStream.


Of course, I could have made a mistake here so if you see a hole in my
logic please shout. I'll add some comments to the code to clarify what
is going on.

Mark

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



Re: Release Tomcat Native 1.1.23

2012-02-21 Thread Rainer Jung

On 21.02.2012 21:56, Costin Manolache wrote:

On Tue, Feb 21, 2012 at 12:51 PM, Rainer Jungwrote:


On 21.02.2012 21:30, Costin Manolache wrote:


Is this going to be from head ? How can I get the NPN ( sslext.c )
included
?


AFAIR 1.1.x is CTR. So you just add it and try to not break 1.1 :)

If you think the same should be in trunk, add it first there and then 
backport directly to 1.1.x. IMHO noone really uses the STATUS file for 
tcnative.


Regards,

Rainer


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



buildbot success in ASF Buildbot on tomcat-trunk

2012-02-21 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/2766

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1292031
Blamelist: markt

Build succeeded!

sincerely,
 -The Buildbot





Re: Release Tomcat Native 1.1.23

2012-02-21 Thread Costin Manolache
Will do it tonight ( it's already in the trunk )

Costin

On Tue, Feb 21, 2012 at 1:25 PM, Rainer Jung wrote:

> On 21.02.2012 21:56, Costin Manolache wrote:
>
>> On Tue, Feb 21, 2012 at 12:51 PM, Rainer Jung**
>> wrote:
>>
>>  On 21.02.2012 21:30, Costin Manolache wrote:
>>>
>>>  Is this going to be from head ? How can I get the NPN ( sslext.c )
 included
 ?

>>>
> AFAIR 1.1.x is CTR. So you just add it and try to not break 1.1 :)
>
> If you think the same should be in trunk, add it first there and then
> backport directly to 1.1.x. IMHO noone really uses the STATUS file for
> tcnative.
>
> Regards,
>
> Rainer
>
>
>
> --**--**-
> To unsubscribe, e-mail: 
> dev-unsubscribe@tomcat.apache.**org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>


[jira] [Commented] (MTOMCAT-116) NonRepeatableRequestException when executing goal tomcat6:deploy

2012-02-21 Thread Canny (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/MTOMCAT-116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13213072#comment-13213072
 ] 

Canny commented on MTOMCAT-116:
---

I have the same problem.

> NonRepeatableRequestException when executing goal tomcat6:deploy
> 
>
> Key: MTOMCAT-116
> URL: https://issues.apache.org/jira/browse/MTOMCAT-116
> Project: Apache Tomcat Maven Plugin
>  Issue Type: Bug
>  Components: tomcat6
>Affects Versions: 2.0-beta-1
> Environment: Client: Windows 7/Eclipse Indigo/Java 5/m2eclipse 
> (embedded mvn 3.0.2/1.0.100.20110804-1717)
> Server: Windows 2003 Server/Tomcat 6.0.32/Java 6/
>Reporter: Michael Yockey
>Assignee: Olivier Lamy
>
> Deployment to Tomcat fails after war upload. The war file does not appear on 
> the server but the maven log marks the upload progess to completion. The 
> application is not successfully deployed. Here is the relevant stack trace 
> from the Maven debugging output:
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute 
> goal org.apache.tomcat.maven:tomcat6-maven-plugin:2.0-SNAPSHOT:deploy 
> (default-cli) on project web-integration: Cannot invoke Tomcat manager
>   at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
>   at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
>   at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
>   at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
>   at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
>   at 
> org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
>   at 
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
>   at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
>   at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
>   at org.apache.maven.cli.MavenCli.execute(MavenCli.java:534)
>   at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
>   at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>   at java.lang.reflect.Method.invoke(Method.java:592)
>   at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
>   at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
>   at 
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
>   at 
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot invoke 
> Tomcat manager
>   at 
> org.apache.tomcat.maven.plugin.tomcat6.AbstractCatalinaMojo.execute(AbstractCatalinaMojo.java:152)
>   at 
> org.apache.tomcat.maven.plugin.tomcat6.AbstractWarCatalinaMojo.execute(AbstractWarCatalinaMojo.java:71)
>   at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
>   at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
>   ... 19 more
> Caused by: org.apache.http.client.ClientProtocolException
>   at 
> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:926)
>   at 
> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:822)
>   at 
> org.apache.tomcat.maven.common.deployer.TomcatManager.invoke(TomcatManager.java:718)
>   at 
> org.apache.tomcat.maven.common.deployer.TomcatManager.deployImpl(TomcatManager.java:681)
>   at 
> org.apache.tomcat.maven.common.deployer.TomcatManager.deploy(TomcatManager.java:363)
>   at 
> org.apache.tomcat.maven.plugin.tomcat6.AbstractDeployWarMojo.deployWar(AbstractDeployWarMojo.java:87)
>   at 
> org.apache.tomcat.maven.plugin.tomcat6.AbstractDeployMojo.invokeManager(AbstractDeployMojo.java:86)
>   at 
> org.apache.tomcat.maven.plugin.tomcat6.AbstractCatalinaMojo.execute(AbstractCatalinaMojo.java:143)
>   ... 22 more
> Caused by: org.apache.http.client.NonRepeatableRequestException: Cannot retry 
> request with a non-repeatable request entity.
>   at 
> org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:686)
>   at 
> org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:515

svn commit: r1292075 - /tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

2012-02-21 Thread markt
Author: markt
Date: Tue Feb 21 22:55:55 2012
New Revision: 1292075

URL: http://svn.apache.org/viewvc?rev=1292075&view=rev
Log:
Bits were released today. The announcement might not make it until tomorrow.

Modified:
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1292075&r1=1292074&r2=1292075&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Tue Feb 21 22:55:55 2012
@@ -63,7 +63,7 @@
 
   
 
-
+
   
 
   



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



Re: svn commit: r1291507 - in /tomcat/trunk/java/org/apache/catalina/websocket: StreamInbound.java WsInputStream.java WsOutbound.java

2012-02-21 Thread Konstantin Kolinko
2012/2/22 Mark Thomas :
> On 21/02/2012 16:31, Konstantin Kolinko wrote:
>> Regarding StreamInbound#doClose(), doPing(), doPong()
>
> Thanks for the review.
>
>>
>> 1. in doClose():
>> status = status + is.read();
>> There is no check whether is.read() is not -1 above.
>
> Added.
>
>> 2.All 3 methods have such loops:
>>             while (read > -1) {
>>                 data.position(data.position() + read);
>>                 read = is.read(data.array(), data.position(), 
>> data.remaining());
>>             }
>>
>> I am not sure what happens if data.remaining() becomes 0 but there are
>> still data in the stream, e.g. from ill-intended client.
>
> This is handled by the underlying WsInputStream. It ensures that only
> the number of bytes declared in the packet header may be read before EOF.
>
>> I think that if there is more data than buffer can handle it will hang 
>> looping
>> indefinitely with read=0.
>
> Since these are all control frames the size of the payload is limited to
> a maximum of 125 bytes therefore I believe we are safe here.
>
>> 3. doPong() method has unbounded while() loop. It wouldn't hang, but I
>> think it is bad that there is no control on how many data are
>> consumed.
>
> Again, the limit is 125 bytes. This is enforced by the payload length
> checks in onData() above combined with the behaviour of WsInputStream.
>

Oh, I see now. That check in onData().

1. I think a comment wouldn't hurt saying that content length and
packet fragmentation is already checked by the caller.

2. Maybe change the method signature to explicitly accept
WsInputStream. With that argument it is possible to use the value of
(wsIs.getPayloadLength() + 1) to allocate the buffer instead of those
explicit values of 126+/-2.


>
> Of course, I could have made a mistake here so if you see a hole in my
> logic please shout. I'll add some comments to the code to clarify what
> is going on.
>

Reviewing WsInputStream I see the following potential issues:
1. processFrameHeader() does not check whether any of read() calls in
it return -1.
If the stream prematurely ended this method will complete happily,
reading a lot of FF and payloadLength of 0 (thanks that "new byte[8]"
creates a new array of all zeros).

It is good that OPCODE_CONTINUATION is zero and that detects this
situation for the second and later frames, but the whole situation is
odd.

2. There is no error flag. If a read() or processFrameHeader()
operation fails with  IOException because of some check and caller
ignores the exception, the next read call will try to read something.


Other minor issues
1. Maybe lower visibility of MessageInbound#bb, #cb  and of
TestWebSocket#isContinuation. They are package-visible at the moment.

Best regards,
Konstantin Kolinko

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



Re: Release Tomcat Native 1.1.23

2012-02-21 Thread Mladen Turk

On 02/21/2012 09:56 PM, Costin Manolache wrote:

On Tue, Feb 21, 2012 at 12:51 PM, Rainer Jungwrote:


On 21.02.2012 21:30, Costin Manolache wrote:


Is this going to be from head ? How can I get the NPN ( sslext.c )
included
?



Mladen is aiming for 1.1.23, so he will be releasing from the 1.1.x branch.



What's the process for backporting ? The main change is adding a file, so
it should be pretty safe.



Not sure if that code is safe and I doubt it'll compile on all platforms,
E.g
TCN_IMPLEMENT_CALL(jint, SSLExt, setSessionData)(TCN_STDARGS, jlong tcsock, 
jbyteArray buf, jint len)
{
unsigned char bytes[len];
^^^

This is not valid C code, although some compiler might allow it.
You would need to use malloc for that buffer since the 'len' is not known in 
advance.
BTW, what's the purpose of this code? Seems it requires java API as well, so
not sure if that's present in all tomcat versions 1.1.23 is supposed to run.
However if not used I don't care ;)


Regards
--
^TM

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



DO NOT REPLY [Bug 52735] Request.getRemoteAddr() throw NullPointerException

2012-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52735

minde sun  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |

--- Comment #3 from minde sun  2012-02-22 02:16:54 UTC ---
You must not access request/response objects outside of request processing
cycle. Failing to adhere to this requirement may lead to notable security
issues.
-
I am not sure what that means? One thing I can guarantee is that we handle the
request/responses within the same thread, we don't create a new thread for
this.
---
Btw, this happened only on my machine, for other machines, we don't hit this
issue.
---
On the other hand, we need to handle null pointer exception for the following
statement in class Http11AprProcessor:
long socketRef = socket.getSocket().longValue();
---
Thanks,
Minde

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

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



DO NOT REPLY [Bug 52735] Request.getRemoteAddr() throw NullPointerException

2012-02-21 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52735

--- Comment #4 from minde sun  2012-02-22 02:18:22 UTC ---
One more thing: I have specified the
-Dorg.apache.catalina.connector.RECYCLE_FACADES=true when I am starting the
tomcat.

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

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



AsyncRequestWorkerFactor / Event Sizing / Closing Connections

2012-02-21 Thread Rainer Jung
Looking at the server status on www.apache.org running 2.3.15 one can 
see, that about 50% of the async connections are in closing state.


We created AsyncRequestWorkerFactor to control the amount of 
overcommitment in terms of connections relative to idle workers we allow 
for each process. The formula is


Connections =

ThreadsPerChild + (AsyncRequestWorkerFactor * idle_workers) =

busy_workers + ((AsyncRequestWorkerFactor+1) * number of idle workers)

Default value for AsyncRequestWorkerFactor is "2", so per default

Connections = busy + 3 * idle.

Now if the situation on www.apache.org turns out to be typical, 50% of 
Connections are in closing state, but we don't expect those to need any 
more worker thread. So the overcommitment would reduce from a factor of 
3 to something closer to 1.5, which isn't much.


Would it be feasible to only count the number of non-closing 
connections, so allow new connections for a process as long as


Non_Closing_Connections <=

ThreadsPerChild + (AsyncRequestWorkerFactor * idle_workers) =

Comments?

A related question: again on www.apache.org not only the number of async 
connections in closing state is pretty high, also the percentage of sync 
connections in state "C" is about 50%! I don't really understand that, 
usually (no big event experience yet) I see "C" only occasionally, not 
with such a big percentage. E.g. on the EU mirror running 2.2 and having 
less traffic there is hardly ever a "C" to notice. Is that an expected 
2.4/event difference, or is there something strange with the us network 
infrastructure?


Regards,

Rainer

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



Re: AsyncRequestWorkerFactor / Event Sizing / Closing Connections

2012-02-21 Thread Rainer Jung

Sorry, wrong list.

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



svn commit: r1292127 - /tomcat/native/trunk/native/src/sslext.c

2012-02-21 Thread costin
Author: costin
Date: Wed Feb 22 04:52:15 2012
New Revision: 1292127

URL: http://svn.apache.org/viewvc?rev=1292127&view=rev
Log:
Use fixed len for the buffers. Add back the code for getting/setting tickets.


Modified:
tomcat/native/trunk/native/src/sslext.c

Modified: tomcat/native/trunk/native/src/sslext.c
URL: 
http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/sslext.c?rev=1292127&r1=1292126&r2=1292127&view=diff
==
--- tomcat/native/trunk/native/src/sslext.c (original)
+++ tomcat/native/trunk/native/src/sslext.c Wed Feb 22 04:52:15 2012
@@ -33,11 +33,14 @@ TCN_IMPLEMENT_CALL(jint, SSLExt, setSess
 {
tcn_socket_t *s = J2P(tcsock, tcn_socket_t *);
tcn_ssl_conn_t *tcssl = (tcn_ssl_conn_t *)s->opaque;
-   unsigned char bytes[len];
-   const unsigned char *bytesp = &bytes[0];
+   jbyte bytes[TCN_BUFFER_SZ];
+   const jbyte *bytesp = &bytes[0];
 
+   if (len > TCN_BUFFER_SZ) {
+   return -1;
+   }
(*e)->GetByteArrayRegion(e, buf, 0, len, bytes);
-   SSL_SESSION* ssl_session = d2i_SSL_SESSION(NULL, &bytesp, len);
+   SSL_SESSION* ssl_session = d2i_SSL_SESSION(NULL, (const unsigned char 
**)&bytesp, len);
 
SSL_set_session(tcssl->ssl, ssl_session);
return 0;
@@ -50,14 +53,14 @@ TCN_IMPLEMENT_CALL(jbyteArray, SSLExt, g
SSL_SESSION *sess = SSL_get_session(tcssl->ssl);
 
int size = i2d_SSL_SESSION(sess, NULL);
-   if (size == 0) {
+   if (size == 0 || size > TCN_BUFFER_SZ) {
return NULL;
}
 
jbyteArray javaBytes = (*e)->NewByteArray(e, size);
if (javaBytes != NULL) {
-   unsigned char bytes[size];
-   unsigned char *bytesp = &bytes[0];
+   jbyte bytes[TCN_BUFFER_SZ];
+   unsigned char *bytesp = (unsigned char *)&bytes[0];
 
i2d_SSL_SESSION(sess, &bytesp);
(*e)->SetByteArrayRegion(e, javaBytes, 0, size, bytes);
@@ -66,8 +69,6 @@ TCN_IMPLEMENT_CALL(jbyteArray, SSLExt, g
return javaBytes;
 }
 
-#ifdef EXP_TICKETS
-// Experimenting with tickets
 TCN_IMPLEMENT_CALL(jint, SSLExt, getTicket)(TCN_STDARGS, jlong tcsock, 
jbyteArray buf)
 {
tcn_socket_t *s = J2P(tcsock, tcn_socket_t *);
@@ -79,7 +80,7 @@ TCN_IMPLEMENT_CALL(jint, SSLExt, getTick
if (!x->tlsext_tick || x->tlsext_ticklen > bufLen) {
return 0;
}
-   (*e)->SetByteArrayRegion(e, buf, 0, x->tlsext_ticklen, 
&x->tlsext_tick[0]);
+   (*e)->SetByteArrayRegion(e, buf, 0, x->tlsext_ticklen, (jbyte *) 
&x->tlsext_tick[0]);
 
return x->tlsext_ticklen;
 }
@@ -91,7 +92,7 @@ TCN_IMPLEMENT_CALL(jint, SSLExt, setTick
tcn_ssl_conn_t *tcssl = (tcn_ssl_conn_t *)s->opaque;
 
char * requestedTicket = apr_pcalloc(tcssl->pool, len);
-   (*e)->GetByteArrayRegion(e, buf, 0, len, requestedTicket);
+   (*e)->GetByteArrayRegion(e, buf, 0, len, (jbyte *) requestedTicket);
SSL_set_session_ticket_ext(tcssl->ssl, requestedTicket, len);
return 0;
 }
@@ -101,12 +102,11 @@ TCN_IMPLEMENT_CALL(jint, SSLExt, setTick
tcn_ssl_ctxt_t *sslctx = J2P(tc_ssl_ctx, tcn_ssl_ctxt_t *);
unsigned char keys[48];
 
-   (*e)->GetByteArrayRegion(e, buf, 0, 48, keys);
+   (*e)->GetByteArrayRegion(e, buf, 0, 48, (jbyte *) keys);
 
SSL_CTX_set_tlsext_ticket_keys(sslctx->ctx, keys, sizeof(keys));
return 0;
 }
-#endif
 
 // Debug code - copied from openssl app
 
@@ -420,21 +420,6 @@ void msg_cb(int write_p, int version, in
(void)BIO_flush(bio);
 }
 
-/*
- TCN_IMPLEMENT_CALL(jint, SSLSocket, setTlsHostname)(TCN_STDARGS, jlong sock,
- jbyteArray buf, jint offset, jint tosend)
- {
- //SSL_set_tlsext_host_name
- return 0;
- }
-
- TCN_IMPLEMENT_CALL(jString, SSLSocket, getTlsHostname)(TCN_STDARGS, jlong 
sock,
- jbyteArray buf, jint offset, jint tosend)
- {
- return NULL;
- }
- */
-
 TCN_IMPLEMENT_CALL(jint, SSLExt, debug)(TCN_STDARGS, jlong tcsock)
 {
tcn_socket_t *s = J2P(tcsock, tcn_socket_t *);
@@ -484,7 +469,6 @@ TCN_IMPLEMENT_CALL( jbyteArray, SSLExt, 
return (jint)-APR_ENOTIMPL;
 }
 
-#ifdef EXP_TICKETS
 TCN_IMPLEMENT_CALL( jint, SSLExt, getTicket)(TCN_STDARGS, jlong tcsock, 
jbyteArray buf)
 {
return (jint)-APR_ENOTIMPL;
@@ -499,7 +483,6 @@ TCN_IMPLEMENT_CALL( jint, SSLExt, setTic
 {
return (jint)-APR_ENOTIMPL;
 }
-#endif
 
 TCN_IMPLEMENT_CALL( jint, SSLExt, sslSetMode)(TCN_STDARGS, jlong tc_ssl_ctx, 
jint mode)
 {
@@ -514,9 +497,12 @@ TCN_IMPLEMENT_CALL(jint, SSLExt, setSNI)
 {
tcn_socket_t *s = J2P(tcsock, tcn_socket_t *);
tcn_ssl_conn_t *tcssl = (tcn_ssl_conn_t *)s->opaque;
-   unsigned char bytes[len];
+   unsigned char bytes[TCN_BUFFER_SZ];
const unsigned char *bytesp = &bytes[0];
 
+   if (len > TCN_BUFFER_SZ) {
+   return -1;
+   }
(*e)->GetByteArrayRegion(e

Re: Release Tomcat Native 1.1.23

2012-02-21 Thread Costin Manolache
On Tue, Feb 21, 2012 at 3:29 PM, Mladen Turk  wrote:

> On 02/21/2012 09:56 PM, Costin Manolache wrote:
>
>> On Tue, Feb 21, 2012 at 12:51 PM, Rainer Jung**
>> wrote:
>>
>>  On 21.02.2012 21:30, Costin Manolache wrote:
>>>
>>>  Is this going to be from head ? How can I get the NPN ( sslext.c )
 included
 ?


>>> Mladen is aiming for 1.1.23, so he will be releasing from the 1.1.x
>>> branch.
>>>
>>>
>> What's the process for backporting ? The main change is adding a file, so
>> it should be pretty safe.
>>
>>
> Not sure if that code is safe and I doubt it'll compile on all platforms,
> E.g
> TCN_IMPLEMENT_CALL(jint, SSLExt, setSessionData)(TCN_STDARGS, jlong
> tcsock, jbyteArray buf, jint len)
> {
> unsigned char bytes[len];
> ^^^
>
> This is not valid C code, although some compiler might allow it.
>

Fixed. Let me know if there is anything else.



> You would need to use malloc for that buffer since the 'len' is not known
> in advance.
> BTW, what's the purpose of this code?


The purpose is to allow use of few TLS extensions - 'next protocol
negotiation' is the main one for SPDY. Also to allow some optimizations -
like reusing sessions ( with a distributed cache or with no server-side
storage ).




> Seems it requires java API as well, so
> not sure if that's present in all tomcat versions 1.1.23 is supposed to
> run.
>

Java APIs are in trunk - and could use the native library independent of
tomcat version.


> However if not used I don't care ;)


As long as it doesn't break the build I suppose :-)

Costin


>
>
>
> Regards
> --
> ^TM
>
> --**--**-
> To unsubscribe, e-mail: 
> dev-unsubscribe@tomcat.apache.**org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>


Re: Release Tomcat Native 1.1.23

2012-02-21 Thread Costin Manolache
Mladen: please let me know if you want to further review the change or
should I merge it to the branch.

I also noticed there are few other diffs - in particular the 'interrupt'
stuff in poll, few others.
Any plans to merge them too ? What's the plan with the trunk ?

Costin

On Tue, Feb 21, 2012 at 3:29 PM, Mladen Turk  wrote:

> On 02/21/2012 09:56 PM, Costin Manolache wrote:
>
>> On Tue, Feb 21, 2012 at 12:51 PM, Rainer Jung**
>> wrote:
>>
>>  On 21.02.2012 21:30, Costin Manolache wrote:
>>>
>>>  Is this going to be from head ? How can I get the NPN ( sslext.c )
 included
 ?


>>> Mladen is aiming for 1.1.23, so he will be releasing from the 1.1.x
>>> branch.
>>>
>>>
>> What's the process for backporting ? The main change is adding a file, so
>> it should be pretty safe.
>>
>>
> Not sure if that code is safe and I doubt it'll compile on all platforms,
> E.g
> TCN_IMPLEMENT_CALL(jint, SSLExt, setSessionData)(TCN_STDARGS, jlong
> tcsock, jbyteArray buf, jint len)
> {
> unsigned char bytes[len];
> ^^^
>
> This is not valid C code, although some compiler might allow it.
> You would need to use malloc for that buffer since the 'len' is not known
> in advance.
> BTW, what's the purpose of this code? Seems it requires java API as well,
> so
> not sure if that's present in all tomcat versions 1.1.23 is supposed to
> run.
> However if not used I don't care ;)
>
>
>
> Regards
> --
> ^TM
>
> --**--**-
> To unsubscribe, e-mail: 
> dev-unsubscribe@tomcat.apache.**org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>


svn commit: r1292131 - in /tomcat/trunk/java/org/apache: coyote/http11/Http11AprProtocol.java tomcat/util/net/AprEndpoint.java

2012-02-21 Thread costin
Author: costin
Date: Wed Feb 22 05:37:34 2012
New Revision: 1292131

URL: http://svn.apache.org/viewvc?rev=1292131&view=rev
Log:
Add a hook to allow handling NPN extensions in the apr protocol ( the extension 
is not available in java ).
I think this is the smallest change to allow plugging in spdy.


Modified:
tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java?rev=1292131&r1=1292130&r2=1292131&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java Wed Feb 
22 05:37:34 2012
@@ -19,6 +19,7 @@ package org.apache.coyote.http11;
 import java.io.IOException;
 
 import org.apache.coyote.AbstractProtocol;
+import org.apache.coyote.Adapter;
 import org.apache.coyote.Processor;
 import org.apache.coyote.http11.upgrade.UpgradeAprProcessor;
 import org.apache.coyote.http11.upgrade.UpgradeInbound;
@@ -26,6 +27,8 @@ import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.util.net.AbstractEndpoint;
 import org.apache.tomcat.util.net.AprEndpoint;
+import org.apache.tomcat.util.net.SocketStatus;
+import org.apache.tomcat.util.net.AbstractEndpoint.Handler.SocketState;
 import org.apache.tomcat.util.net.AprEndpoint.Handler;
 import org.apache.tomcat.util.net.SocketWrapper;
 
@@ -42,6 +45,15 @@ public class Http11AprProtocol extends A
 
 private static final Log log = LogFactory.getLog(Http11AprProtocol.class);
 
+/** 
+ * Interface specific for protocols that negotiate at NPN level, like 
+ * SPDY. This is only available for APR, will replace the HTTP framing.
+ */
+public static interface NpnHandler {
+SocketState process(SocketWrapper socket, SocketStatus status,
+Http11AprProtocol proto, AbstractEndpoint endpoint);
+public void init(final AbstractEndpoint ep, long sslContext, Adapter 
adapter);
+}
 
 @Override
 protected Log getLog() { return log; }
@@ -63,6 +75,7 @@ public class Http11AprProtocol extends A
 }
 
 private final Http11ConnectionHandler cHandler;
+private NpnHandler npnHandler;
 
 public boolean getUseSendfile() { return 
((AprEndpoint)endpoint).getUseSendfile(); }
 public void setUseSendfile(boolean useSendfile) { 
((AprEndpoint)endpoint).setUseSendfile(useSendfile); }
@@ -171,6 +184,16 @@ public class Http11AprProtocol extends A
 public int getSSLVerifyDepth() { return 
((AprEndpoint)endpoint).getSSLVerifyDepth(); }
 public void setSSLVerifyDepth(int SSLVerifyDepth) { 
((AprEndpoint)endpoint).setSSLVerifyDepth(SSLVerifyDepth); }
 
+// TODO: map of protocols
+public void setNpnHandler(String impl) {
+try {
+Class c = Class.forName(impl);
+npnHandler = (NpnHandler) c.newInstance();
+} catch (Exception ex) {
+getLog().warn("Failed to init light protocol " + impl, ex);
+}
+}
+
 // - JMX related 
methods
 
 @Override
@@ -178,7 +201,16 @@ public class Http11AprProtocol extends A
 return ("http-apr");
 }
 
-
+
+@Override
+public void start() throws Exception {
+super.start();
+if (npnHandler != null) {
+long sslCtx = ((AprEndpoint) endpoint).getJniSslContext();
+npnHandler.init(endpoint, sslCtx, adapter);
+}
+}
+
 //   Connection handler 
 
 protected static class Http11ConnectionHandler
@@ -225,6 +257,29 @@ public class Http11AprProtocol extends A
 socket.getSocket().longValue(), true);
 }
 }
+
+@Override
+public SocketState process(SocketWrapper socket,
+SocketStatus status) {
+if (proto.npnHandler != null) {
+Processor processor = null;
+if (status == SocketStatus.OPEN) {
+processor = connections.get(socket.getSocket());
+   
+}
+if (processor == null) {
+// if not null - this is a former comet request, handled 
by http11
+SocketState socketState = proto.npnHandler.process(socket, 
status,
+proto, proto.endpoint);
+// handled by npn protocol.
+if (socketState == SocketState.CLOSED ||
+socketState == SocketState.LONG) {
+return socketState;
+}
+}
+}
+return sup

Re: Release Tomcat Native 1.1.23

2012-02-21 Thread Mladen Turk

On 02/22/2012 06:17 AM, Costin Manolache wrote:

Mladen: please let me know if you want to further review the change or
should I merge it to the branch.



Well I personally would not merge that into 1.1.x branch.
It would be a bit weird to have 1.1.22 as is, and 1.1.23 with
whole bunch of new features and API's.
That's not why we introduced branches at the first place.


I also noticed there are few other diffs - in particular the 'interrupt'
stuff in poll, few others.
Any plans to merge them too ?


Nope. Not to the 1.1.x branch


What's the plan with the trunk ?



We can release 1.2.0 from trunk.
I see no problem with that.
It requires apr-1.4.x so this might be a solution for
that sslext code instead porting that back to 1.1.x
We can require 1.2.x for tomcat8 and actually use that
new API's without worrying on backward compatibility.



Regards
--
^TM

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



[jira] [Created] (MTOMCAT-120) Support "skip" parameter

2012-02-21 Thread Created
Support "skip" parameter


 Key: MTOMCAT-120
 URL: https://issues.apache.org/jira/browse/MTOMCAT-120
 Project: Apache Tomcat Maven Plugin
  Issue Type: Improvement
  Components: tomcat7
Affects Versions: 2.0-beta-1
 Environment: -
Reporter: Cédric Dutoit
Assignee: Olivier Lamy
 Fix For: 2.0


Please support a "skip" parameter to tomcat-run, tomcat-shutdown, as does jetty 
project.

For my project, I use SkipITs variable to ask failsafe plugin to not execute IT 
tests.
I also want to avoid having Tomcat started, stopped if IT tests won't execute 
(skipITs=true).
I have the following configuration:




org.apache.tomcat.maven

tomcat7-maven-plugin
2.0-SNAPSHOT


TomcatRunner





tomcat-run


run-war-only


pre-integration-test



tomcat-shutdown


shutdown


post-integration-test




I need a skip variable as to use the following execution configuration:
${skipITs}


Maybe a single variable + 
if (skip)  {
   log(...)
   return;
}
... in org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo
(http://svn.apache.org/repos/asf/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractRunMojo.java)
would be enough.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



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