svn commit: r1672029 - /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/jni/SSLContext.java

2015-04-08 Thread markt
Author: markt
Date: Wed Apr  8 08:24:30 2015
New Revision: 1672029

URL: http://svn.apache.org/r1672029
Log:
CTR: Align whitespace

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/jni/SSLContext.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/jni/SSLContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/jni/SSLContext.java?rev=1672029&r1=1672028&r2=1672029&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/jni/SSLContext.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/jni/SSLContext.java Wed Apr  8 
08:24:30 2015
@@ -20,7 +20,6 @@ package org.apache.tomcat.jni;
 /** SSL Context
  *
  * @author Mladen Turk
- *
  */
 public final class SSLContext {
 



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



svn commit: r1672040 - /tomcat/tc8.0.x/trunk/java/org/apache/tomcat/jni/Library.java

2015-04-08 Thread markt
Author: markt
Date: Wed Apr  8 09:16:57 2015
New Revision: 1672040

URL: http://svn.apache.org/r1672040
Log:
Follow-up to r1671864. Java 6 compatibility. Need to catch Throwable to catch 
the UnsatisifiedLinkError

Modified:
tomcat/tc8.0.x/trunk/java/org/apache/tomcat/jni/Library.java

Modified: tomcat/tc8.0.x/trunk/java/org/apache/tomcat/jni/Library.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/tomcat/jni/Library.java?rev=1672040&r1=1672039&r2=1672040&view=diff
==
--- tomcat/tc8.0.x/trunk/java/org/apache/tomcat/jni/Library.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/tomcat/jni/Library.java Wed Apr  8 
09:16:57 2015
@@ -32,7 +32,7 @@ public final class Library {
  */
 private static Library _instance = null;
 
-private Library() throws Exception {
+private Library() throws Throwable {
 boolean loaded = false;
 String path = System.getProperty("java.library.path");
 String [] paths = path.split(File.pathSeparator);
@@ -47,7 +47,7 @@ public final class Library {
 // Don't use a Java 7 multiple exception catch so we can keep
 // the JNI code identical between Tomcat 6/7/8
 throw t;
-} catch (Exception t) {
+} catch (Throwable t) {
 String name = System.mapLibraryName(NAMES[i]);
 for (int j = 0; j < paths.length; j++) {
 java.io.File fd = new java.io.File(paths[j] , name);
@@ -168,7 +168,7 @@ public final class Library {
  * @param libraryName the name of the library to load
  */
 public static boolean initialize(String libraryName)
-throws Exception
+throws Throwable
 {
 if (_instance == null) {
 if (libraryName == null)



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



svn commit: r1672041 - /tomcat/tc7.0.x/trunk/java/org/apache/tomcat/jni/Library.java

2015-04-08 Thread markt
Author: markt
Date: Wed Apr  8 09:19:03 2015
New Revision: 1672041

URL: http://svn.apache.org/r1672041
Log:
Follow-up to r1671865. Java 6 compatibility. Need to catch Throwable to catch 
the UnsatisifiedLinkError

Modified:
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/jni/Library.java

Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/jni/Library.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/jni/Library.java?rev=1672041&r1=1672040&r2=1672041&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/jni/Library.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/jni/Library.java Wed Apr  8 
09:19:03 2015
@@ -32,7 +32,7 @@ public final class Library {
  */
 private static Library _instance = null;
 
-private Library() throws Exception {
+private Library() throws Throwable {
 boolean loaded = false;
 String path = System.getProperty("java.library.path");
 String [] paths = path.split(File.pathSeparator);
@@ -47,7 +47,7 @@ public final class Library {
 // Don't use a Java 7 multiple exception catch so we can keep
 // the JNI code identical between Tomcat 6/7/8
 throw t;
-} catch (Exception t) {
+} catch (Throwable t) {
 String name = System.mapLibraryName(NAMES[i]);
 for (int j = 0; j < paths.length; j++) {
 java.io.File fd = new java.io.File(paths[j] , name);
@@ -168,7 +168,7 @@ public final class Library {
  * @param libraryName the name of the library to load
  */
 public static boolean initialize(String libraryName)
-throws Exception
+throws Throwable
 {
 if (_instance == null) {
 if (libraryName == null)



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



svn commit: r1672046 - /tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java

2015-04-08 Thread markt
Author: markt
Date: Wed Apr  8 09:43:04 2015
New Revision: 1672046

URL: http://svn.apache.org/r1672046
Log:
Fix some IDE warnings

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java?rev=1672046&r1=1672045&r2=1672046&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Wed Apr  8 
09:43:04 2015
@@ -1191,6 +1191,7 @@ public class Nio2Endpoint extends Abstra
  * all remaining data.
  */
 public static final CompletionCheck COMPLETE_WRITE = new 
CompletionCheck() {
+@Override
 public CompletionHandlerCall callHandler(CompletionState state, 
ByteBuffer[] buffers, int offset, int length) {
 for (int i = 0; i < offset; i++) {
 if (buffers[i].remaining() > 0) {
@@ -1206,6 +1207,7 @@ public class Nio2Endpoint extends Abstra
  * to be called once some data has been read.
  */
 public static final CompletionCheck READ_DATA = new CompletionCheck() {
+@Override
 public CompletionHandlerCall callHandler(CompletionState state, 
ByteBuffer[] buffers, int offset, int length) {
 return (state == CompletionState.DONE) ? 
CompletionHandlerCall.DONE : CompletionHandlerCall.NONE;
 }
@@ -1235,7 +1237,7 @@ public class Nio2Endpoint extends Abstra
 long timeout, TimeUnit unit, A attachment,
 CompletionCheck check,
 CompletionHandler handler) {
-OperationState state = new OperationState(dsts, offset, 
length, timeout, unit, attachment, check, handler);
+OperationState state = new OperationState<>(dsts, offset, 
length, timeout, unit, attachment, check, handler);
 if (readPending.tryAcquire()) {
 Nio2Endpoint.startInline();
 // FIXME: Add scatter read to Nio2Channel and 
ScatterReadCompletionHandler class
@@ -1277,7 +1279,7 @@ public class Nio2Endpoint extends Abstra
 long timeout, TimeUnit unit, A attachment,
 CompletionCheck check,
 CompletionHandler handler) {
-OperationState state = new OperationState(srcs, offset, 
length, timeout, unit, attachment, check, handler);
+OperationState state = new OperationState<>(srcs, offset, 
length, timeout, unit, attachment, check, handler);
 if (writePending.tryAcquire()) {
 Nio2Endpoint.startInline();
 getSocket().write(srcs, offset, length, timeout, unit, state, 
new GatherWriteCompletionHandler<>());



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



svn commit: r1672047 - /tomcat/tc6.0.x/trunk/STATUS.txt

2015-04-08 Thread markt
Author: markt
Date: Wed Apr  8 09:47:36 2015
New Revision: 1672047

URL: http://svn.apache.org/r1672047
Log:
Proposal

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1672047&r1=1672046&r2=1672047&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Apr  8 09:47:36 2015
@@ -28,7 +28,15 @@ None
 PATCHES PROPOSED TO BACKPORT:
   [ New proposals should be added at the end of the list ]
 
-None
+* Align org.apache.tomcat.jni with 7.0.x and 8.0.x
+  Backport improvements to AprLifecycleListener
+  svn cp the following o.a.t.jni classes from 7.0.x:
+Buffer
+LibraryNotFoundError
+Thread
+  http://people.apache.org/~markt/patches/2015-04-08-jni-align-tc6-v1.patch
+  +1: markt
+  -1:
 
 
 PATCHES/ISSUES THAT ARE STALLED:



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



svn commit: r1672050 - in /tomcat/trunk/java/org/apache/tomcat/util/net: Nio2Channel.java Nio2Endpoint.java SecureNio2Channel.java

2015-04-08 Thread remm
Author: remm
Date: Wed Apr  8 09:53:45 2015
New Revision: 1672050

URL: http://svn.apache.org/r1672050
Log:
Add read, fixes and cleanups.

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Channel.java
tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Channel.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Channel.java?rev=1672050&r1=1672049&r2=1672050&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Channel.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Channel.java Wed Apr  8 
09:53:45 2015
@@ -135,6 +135,12 @@ public class Nio2Channel implements Asyn
 sc.read(dst, timeout, unit, attachment, handler);
 }
 
+public  void read(ByteBuffer[] dsts,
+int offset, int length, long timeout, TimeUnit unit,
+A attachment, CompletionHandler handler) {
+sc.read(dsts, offset, length, timeout, unit, attachment, handler);;
+}
+
 @Override
 public Future write(ByteBuffer src) {
 return sc.write(src);

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java?rev=1672050&r1=1672049&r2=1672050&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Wed Apr  8 
09:53:45 2015
@@ -1044,7 +1044,60 @@ public class Nio2Endpoint extends Abstra
 }
 
 // TODO: NIO2 style scatter/gather methods.
-// TODO: SecureNio2Channel gather would need to be improved
+// TODO: SecureNio2Channel scatter/gather would need to be improved
+
+public enum CompletionState {
+/**
+ * Operation is pending and the completion handler will
+ * be called later.
+ */
+PENDING,
+/**
+ * The operation completed inline, and the completion handler
+ * will not be called unless an error occurred.
+ */
+INLINE,
+/**
+ * The operation completed, but not inline.
+ */
+DONE
+}
+
+public enum CompletionHandlerCall {
+/**
+ * Operation should continue, the completion handler shouldn't be
+ * called.
+ */
+CONTINUE,
+/**
+ * The operation completed but the completion handler shouldn't be
+ * called. This is possibly useful if the operation completed
+ * inline.
+ */
+NONE,
+/**
+ * The operation is complete, call the completion handler.
+ */
+DONE
+}
+
+public interface CompletionCheck {
+/**
+ * Return true if enough data has been read or written and the
+ * handler should be notified. Return false if the IO is
+ * incomplete (data has not been fully written while it should,
+ * or more data read is needed for further processing) and should
+ * be continued before the completion handler is called.
+ *
+ * @param state of the operation (done or done inline since the
+ *IO call is done)
+ * @param buffers ByteBuffer[] that has been passed to the
+ *original IO call
+ * @param offset that has been passed to the original IO call
+ * @param length that has been passed to the original IO call
+ */
+public CompletionHandlerCall callHandler(CompletionState state, 
ByteBuffer[] buffers, int offset, int length);
+}
 
 /**
  * Internal state tracker for scatter/gather operations.
@@ -1069,13 +1122,64 @@ public class Nio2Endpoint extends Abstra
 this.attachment = attachment;
 this.check = check;
 this.handler = handler;
-this.pos = offset;
 }
 private long nBytes = 0;
-private int pos;
 private CompletionState state = CompletionState.PENDING;
 }
 
+private class ScatterReadCompletionHandler implements 
CompletionHandler> {
+@Override
+public void completed(Long nBytes, OperationState state) {
+if (nBytes.intValue() < 0) {
+failed(new EOFException(), state);
+} else {
+state.nBytes += nBytes.longValue();
+CompletionState currentState = Nio2Endpoint.is

Re: Reg: Bug 56438

2015-04-08 Thread Pravallika Peddi
Hi Mark,

Currently there is no mechanism to skip the JARs from Pluggability scan in
Tomcat 8.0.

Below are the fix details that i propose for *tomcat 8* pluggability scan
problem:



1)  Added below code in
org.apache.tomcat.util.descriptor.web.FragmentJarScannerCallBack.java  à

private boolean fragmentFoundInJar = false;



  In scan methods of this calls setting this variable to true when
needed and if JAR   does not has any fragments added a message:

  *if(!fragmentFoundInJar){*

*log.info
(Localizer.getMessage("jspc.warning.NoFragmentInFile",
   fragmentFile.getAbsolutePath()));*

*  }*




Added below method to retrieve this value:

*public* *boolean* scanFoundNoFragments(){

*return* !fragmentFoundInJar;

  }





2)  We are doing fragment scan in two locations:



*First:*

Org.apache.catalina.startup.ContextConfig.java  à
processJarsForWebFragments(WebXml
application)

Highlighted text is the Fix:



  FragmentJarScannerCallback callback =

*new* FragmentJarScannerCallback(webXmlParser, delegate,
parseRequired);



jarScanner.scan(JarScanType.*PLUGGABILITY*,

context.getServletContext(), callback);



*boolean* scanFoundNoFrag = callback.scanFoundNoFragments();

*if*(!callback.scanFoundNoFragments()){

*log*.info(Localizer.*getMessage*(
"jspc.warning.NoFragmentSummary"));

}



*if* (!callback.isOk()) {

ok = *false*;

}



*  Second:*

  Org.apache.jasper.servlet.JspCServletContext.java  à
scanForFragments(WebXmlParser
webXmlParser)

  Highlighted text is the fix:

  FragmentJarScannerCallback callback =

*new* FragmentJarScannerCallback(webXmlParser, *false*,
*true*);

scanner.scan(JarScanType.*PLUGGABILITY*, *this*, callback);



*if*(!callback.scanFoundNoFragments()){

log(Localizer.*getMessage*("jspc.warning.NoFragmentSummary"));

}



*if* (!callback.isOk()) {

*throw* *new* JasperException(Localizer.*getMessage*(
"jspc.error.invalidFragment"));

}



I tested the changes and the Jars mentioned under
"tomcat.util.scan.StandardJarScanFilter.jarsToSkip"
are getting skipped from both pluggability and tld scans.


Attached the changed classes for review.


For *Tomcat7* related changes, i will send another email.

On Sun, Mar 29, 2015 at 4:07 AM, Mark Thomas  wrote:

> On 26/03/2015 13:27, Pravallika Peddi wrote:
>
> 
>
> > 1) As mentioned in bug, in Tomcat7.0 catalina.properties file first 4
> > default jars(except jdom.jar) are missing:
> >   commons-discovery-*.jar,commons-el-*.jar,commons-net-*.jar
> >
> >  We can add them under
> > “tomcat.util.scan.DefaultJarScanner.jarsToSkip”
>
> jdom.jar isn't covered by the existing filters.
>
> 
>
> > 3)   3)  So I am planning to provide a fix as below for Tomcat
> 7.0
> > TLD scan:
>
> Looks OK so far.
>
> 
>
> > But in Tomcat 7.0, StandardJarScanner.scan  method only called from both
> > TldConfig.java and ContextConfig.java. So I am afraid I cannot add the
> > Summary message in Tomcat7.0. When User enables FINE  level then only
> they
> > can see the noTldInJar messages
>
> Look again. It certainly is possible to add the summary message for TLDs
> in Tomcat 7.
>
> > 4) Tomcat7.0 ContextConfig scan is taking less time, hence I feel we can
> > ignore it for now.
>
> I disagree. The pluggability scanning can add a significant start-up
> delay to web applications. The reason that the bug report was opened in
> the first place is the time taken for the pluggability scans.
>
> > Please let me know your opinion.
>
> I think you have some more research to do.
>
> Mark
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>

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

Re: svn commit: r1672047 - /tomcat/tc6.0.x/trunk/STATUS.txt

2015-04-08 Thread Konstantin Kolinko
2015-04-08 12:47 GMT+03:00  :
> Author: markt
> Date: Wed Apr  8 09:47:36 2015
> New Revision: 1672047
>
> URL: http://svn.apache.org/r1672047
> Log:
> Proposal
>
> Modified:
> tomcat/tc6.0.x/trunk/STATUS.txt
>
> Modified: tomcat/tc6.0.x/trunk/STATUS.txt
> URL: 
> http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1672047&r1=1672046&r2=1672047&view=diff
> ==
> --- tomcat/tc6.0.x/trunk/STATUS.txt (original)
> +++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Apr  8 09:47:36 2015
> @@ -28,7 +28,15 @@ None
>  PATCHES PROPOSED TO BACKPORT:
>[ New proposals should be added at the end of the list ]
>
> -None
> +* Align org.apache.tomcat.jni with 7.0.x and 8.0.x
> +  Backport improvements to AprLifecycleListener
> +  svn cp the following o.a.t.jni classes from 7.0.x:
> +Buffer
> +LibraryNotFoundError
> +Thread
> +  http://people.apache.org/~markt/patches/2015-04-08-jni-align-tc6-v1.patch
> +  +1: markt
> +  -1:


I see no point in backporting unused Buffer and Thread classes.

LibraryNotFoundError is used by the proposed patch, so it is OK.

Best regards,
Konstantin Kolinko

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



Re: Scatter / gather

2015-04-08 Thread Rémy Maucherat
2015-03-06 16:49 GMT+01:00 Mark Thomas :

> I can see how both might be useful. No objections here.
>
> So in addition to my initial plan, I added some state information (NIO2
thinks it is a good idea to hide it), as well as flexibility for the
completion handler call (NIO2 calls it as soon as it read or wrote
anything, leading in most cases to boilerplate code to handle incomplete
operations).

There's also no internal buffering and added sync since the caller should
use what it needs there, the idea is to preparse the protocol in the IO on
read and avoid dumb buffering copies on write. OTOH, with encryption the
benefits go away to some extent (the NIO2 SSL would be improved though,
it's not really representative at the moment) and the "test" will be if
this is useful for HTTP/2. In that case it could be generalized, otherwise
there will be no point keeping it.

Rémy


Re: Reg: Bug 56438

2015-04-08 Thread Pravallika Peddi
Hi Mark,


Highlighted code is the Fix to add summary message to *Tomcat7.0*:


In org.apache.catalina.startup.TldConfig.java à



a)  Return a Boolean variable from tldScanJar(JarURLConnection jarConn)
method which indicates tld found or not.

b)  In  TldJarScannerCallback inner class à add code a sbelow:



 boolean isFound = false;



 @Override

public void scan(JarURLConnection urlConn) throws IOException {

log.info("Scanning jar in scan function:" + urlConn);

isFound = tldScanJar(urlConn);

}



@Override

public void scan(File file) {

File metaInf = new File(file, "META-INF");

if (metaInf.isDirectory()) {

isFound = tldScanDir(metaInf);

}

}



private boolean scanFoundNoTLDs() {

log.info("tldFound at end:" + isFound);

return !isFound;

}





c)   In execute() method add below code:



TldJarScannerCallback objCallBack = *new* TldJarScannerCallback();

 jarScanner.scan(context.getServletContext(),

context.getLoader().getClassLoader(),

objCallBack, *noTldJars*);



*if*(objCallBack.scanFoundNoTLDs()){

*log*.info(*sm*.getString("tldConfig.noTldSummary"));

}



I tested the fix and Summary message is getting added to log.

Attached the java file that contains these changes.

Please review and let me know if the fix is ok or not.


I will send another mail for pluggability scan fix details for Tomcat7.0


Thanks,

Pravallika (VIN)

On Sun, Mar 29, 2015 at 4:07 AM, Mark Thomas  wrote:

> On 26/03/2015 13:27, Pravallika Peddi wrote:
>
> 
>
> > 1) As mentioned in bug, in Tomcat7.0 catalina.properties file first 4
> > default jars(except jdom.jar) are missing:
> >   commons-discovery-*.jar,commons-el-*.jar,commons-net-*.jar
> >
> >  We can add them under
> > “tomcat.util.scan.DefaultJarScanner.jarsToSkip”
>
> jdom.jar isn't covered by the existing filters.
>
> 
>
> > 3)   3)  So I am planning to provide a fix as below for Tomcat
> 7.0
> > TLD scan:
>
> Looks OK so far.
>
> 
>
> > But in Tomcat 7.0, StandardJarScanner.scan  method only called from both
> > TldConfig.java and ContextConfig.java. So I am afraid I cannot add the
> > Summary message in Tomcat7.0. When User enables FINE  level then only
> they
> > can see the noTldInJar messages
>
> Look again. It certainly is possible to add the summary message for TLDs
> in Tomcat 7.
>
> > 4) Tomcat7.0 ContextConfig scan is taking less time, hence I feel we can
> > ignore it for now.
>
> I disagree. The pluggability scanning can add a significant start-up
> delay to web applications. The reason that the bug report was opened in
> the first place is the time taken for the pluggability scans.
>
> > Please let me know your opinion.
>
> I think you have some more research to do.
>
> Mark
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>

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

Re: svn commit: r1672047 - /tomcat/tc6.0.x/trunk/STATUS.txt

2015-04-08 Thread Mark Thomas
On 08/04/2015 11:13, Konstantin Kolinko wrote:
> 2015-04-08 12:47 GMT+03:00  :
>> Author: markt
>> Date: Wed Apr  8 09:47:36 2015
>> New Revision: 1672047
>>
>> URL: http://svn.apache.org/r1672047
>> Log:
>> Proposal
>>
>> Modified:
>> tomcat/tc6.0.x/trunk/STATUS.txt
>>
>> Modified: tomcat/tc6.0.x/trunk/STATUS.txt
>> URL: 
>> http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1672047&r1=1672046&r2=1672047&view=diff
>> ==
>> --- tomcat/tc6.0.x/trunk/STATUS.txt (original)
>> +++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Apr  8 09:47:36 2015
>> @@ -28,7 +28,15 @@ None
>>  PATCHES PROPOSED TO BACKPORT:
>>[ New proposals should be added at the end of the list ]
>>
>> -None
>> +* Align org.apache.tomcat.jni with 7.0.x and 8.0.x
>> +  Backport improvements to AprLifecycleListener
>> +  svn cp the following o.a.t.jni classes from 7.0.x:
>> +Buffer
>> +LibraryNotFoundError
>> +Thread
>> +  http://people.apache.org/~markt/patches/2015-04-08-jni-align-tc6-v1.patch
>> +  +1: markt
>> +  -1:
> 
> 
> I see no point in backporting unused Buffer and Thread classes.

Consistency. They aren't used in 7.0.x or 8.0.x either.

I'm aiming for tomcat-jni.jar to be effectively the same for 6.0.x,
7.0.x, 8.0.x. The longer term aim is to follow through on a previous
discussion and have tomcat-jni.jar ship as part of tomcat-native. This
is a step in that direction.

It also makes it easier to check fixes haven't been missed if the
packages are identical.

Mark


> LibraryNotFoundError is used by the proposed patch, so it is OK.
> 
> Best regards,
> Konstantin Kolinko
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 


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



svn commit: r1672057 - in /tomcat/trunk/java/org/apache/tomcat/util/net: Nio2Endpoint.java SecureNio2Channel.java

2015-04-08 Thread remm
Author: remm
Date: Wed Apr  8 10:30:22 2015
New Revision: 1672057

URL: http://svn.apache.org/r1672057
Log:
Improve comments.

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/SecureNio2Channel.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java?rev=1672057&r1=1672056&r2=1672057&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Wed Apr  8 
10:30:22 2015
@@ -1044,17 +1044,14 @@ public class Nio2Endpoint extends Abstra
 }
 
 // TODO: NIO2 style scatter/gather methods.
-// TODO: SecureNio2Channel scatter/gather would need to be improved
 
 public enum CompletionState {
 /**
- * Operation is pending and the completion handler will
- * be called later.
+ * Operation is still pending.
  */
 PENDING,
 /**
- * The operation completed inline, and the completion handler
- * will not be called unless an error occurred.
+ * The operation completed inline.
  */
 INLINE,
 /**
@@ -1071,12 +1068,12 @@ public class Nio2Endpoint extends Abstra
 CONTINUE,
 /**
  * The operation completed but the completion handler shouldn't be
- * called. This is possibly useful if the operation completed
- * inline.
+ * called.
  */
 NONE,
 /**
- * The operation is complete, call the completion handler.
+ * The operation is complete, the completion handler should be
+ * called.
  */
 DONE
 }
@@ -1263,8 +1260,9 @@ public class Nio2Endpoint extends Abstra
  * data has been read or an error occurred. If a CompletionCheck
  * object has been provided, the completion handler will only be
  * called if the callHandler method returned true. If no
- * CompletionCheck object has been provided, the completion handler
- * will be called.
+ * CompletionCheck object has been provided, the ddefault NIO2
+ * behavior is used: the completion handler will be called as soon
+ * as some data has been read, even if the read has completed inline.
  *
  * @param dsts buffers
  * @param offset in the buffer array
@@ -1277,11 +1275,9 @@ public class Nio2Endpoint extends Abstra
  * @return the completion state (done, done inline, or still pending)
  */
 // FIXME: @Override
-public  CompletionState read(ByteBuffer[] dsts,
-int offset, int length,
+public  CompletionState read(ByteBuffer[] dsts, int offset, int 
length,
 long timeout, TimeUnit unit, A attachment,
-CompletionCheck check,
-CompletionHandler handler) {
+CompletionCheck check, CompletionHandler 
handler) {
 OperationState state = new OperationState<>(dsts, offset, 
length, timeout, unit, attachment, check, handler);
 if (readPending.tryAcquire()) {
 Nio2Endpoint.startInline();
@@ -1293,6 +1289,7 @@ public class Nio2Endpoint extends Abstra
 return state.state;
 }
 
+// FIXME: @Override
 public boolean isWritePending() {
 synchronized (writeCompletionHandler) {
 return writePending.availablePermits() == 0;
@@ -1304,8 +1301,10 @@ public class Nio2Endpoint extends Abstra
  * data has been written or an error occurred. If a CompletionCheck
  * object has been provided, the completion handler will only be
  * called if the callHandler method returned true. If no
- * CompletionCheck object has been provided, the completion handler
- * will be called.
+ * CompletionCheck object has been provided, the ddefault NIO2
+ * behavior is used: the completion handler will be called, even
+ * if the write is incomplete and data remains in the buffers, or
+ * if the write completed inline.
  *
  * @param srcs buffers
  * @param offset in the buffer array
@@ -1318,11 +1317,9 @@ public class Nio2Endpoint extends Abstra
  * @return the completion state (done, done inline, or still pending)
  */
 // FIXME: @Override
-public  CompletionState write(ByteBuffer[] srcs,
-int offset, int length,
+public  CompletionState write(ByteBuffer[] srcs, int offset, int 
length,
 long timeout, TimeUnit unit, A attachment,
- 

svn commit: r1672058 - /tomcat/trunk/java/org/apache/tomcat/jni/SSLExt.java

2015-04-08 Thread markt
Author: markt
Date: Wed Apr  8 10:53:27 2015
New Revision: 1672058

URL: http://svn.apache.org/r1672058
Log:
Clean-up

Modified:
tomcat/trunk/java/org/apache/tomcat/jni/SSLExt.java

Modified: tomcat/trunk/java/org/apache/tomcat/jni/SSLExt.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/SSLExt.java?rev=1672058&r1=1672057&r2=1672058&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/jni/SSLExt.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/SSLExt.java Wed Apr  8 10:53:27 2015
@@ -21,7 +21,7 @@ package org.apache.tomcat.jni;
  *
  * The methods are separated to make it easier for java code to
  * support existing native library - it can check if this class can
- * be loaded in order to use the exensions.
+ * be loaded in order to use the extensions.
  *
  * @author Costin Manolache
  */
@@ -41,7 +41,7 @@ public final class SSLExt {
  *
  * Not supported in 1.0.0, seems to be in 1.0.1 and after
  */
-public static native int setNPN(long tcctx, byte[] proto, int len);
+public static native int setNPN(long ctx, byte[] proto, int len);
 
 /**
  * Get other side's advertised protocols.
@@ -121,9 +121,9 @@ public final class SSLExt {
  */
 public static native long sslSetMode(long tcsock, long mode);
 
-public static int setNPN(long sslContext, byte[] spdyNPN) {
+public static int setNPN(long ctx, byte[] spdyNPN) {
 try {
-return SSLExt.setNPN(sslContext, spdyNPN, spdyNPN.length);
+return SSLExt.setNPN(ctx, spdyNPN, spdyNPN.length);
 } catch (Throwable t) {
 t.printStackTrace();
 return -1;
@@ -153,7 +153,4 @@ public final class SSLExt {
 }
 return true;
 }
-
-
-
 }



-
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

2015-04-08 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/1106

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

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch tomcat/trunk] 1672046
Blamelist: markt

Build succeeded!

Sincerely,
 -The Buildbot




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



buildbot exception in ASF Buildbot on tomcat-trunk

2015-04-08 Thread buildbot
The Buildbot has detected a build exception on builder tomcat-trunk while 
building ASF Buildbot. Full details are available at:
http://ci.apache.org/builders/tomcat-trunk/builds/1107

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

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch tomcat/trunk] 1672058
Blamelist: markt,remm

BUILD FAILED: exception upload_2

Sincerely,
 -The Buildbot




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



svn commit: r1672067 - /tomcat/native/trunk/native/srclib/VERSIONS

2015-04-08 Thread markt
Author: markt
Date: Wed Apr  8 11:46:17 2015
New Revision: 1672067

URL: http://svn.apache.org/r1672067
Log:
Update versions

Modified:
tomcat/native/trunk/native/srclib/VERSIONS

Modified: tomcat/native/trunk/native/srclib/VERSIONS
URL: 
http://svn.apache.org/viewvc/tomcat/native/trunk/native/srclib/VERSIONS?rev=1672067&r1=1672066&r2=1672067&view=diff
==
--- tomcat/native/trunk/native/srclib/VERSIONS (original)
+++ tomcat/native/trunk/native/srclib/VERSIONS Wed Apr  8 11:46:17 2015
@@ -1,4 +1,4 @@
 Use the following version of the libraries
 
-- APR 1.4.8, http://apr.apache.org
-- OpenSSL 1.0.1j, http://www.openssl.org
+- APR 1.5.1, http://apr.apache.org
+- OpenSSL 1.0.2 or later, http://www.openssl.org



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



svn commit: r1672068 - /tomcat/native/trunk/native/src/ssl.c

2015-04-08 Thread markt
Author: markt
Date: Wed Apr  8 11:47:09 2015
New Revision: 1672068

URL: http://svn.apache.org/r1672068
Log:
Remove unnecessary directives since the minimum OpenSSL version is 1.0.2

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

Modified: tomcat/native/trunk/native/src/ssl.c
URL: 
http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/ssl.c?rev=1672068&r1=1672067&r2=1672068&view=diff
==
--- tomcat/native/trunk/native/src/ssl.c (original)
+++ tomcat/native/trunk/native/src/ssl.c Wed Apr  8 11:47:09 2015
@@ -281,21 +281,17 @@ static apr_status_t ssl_init_cleanup(voi
 /*
  * Try to kill the internals of the SSL library.
  */
-#if OPENSSL_VERSION_NUMBER >= 0x00907001
 /* Corresponds to OPENSSL_load_builtin_modules():
  * XXX: borrowed from apps.h, but why not CONF_modules_free()
  * which also invokes CONF_modules_finish()?
  */
 CONF_modules_unload(1);
-#endif
 /* Corresponds to SSL_library_init: */
 EVP_cleanup();
 #if HAVE_ENGINE_LOAD_BUILTIN_ENGINES
 ENGINE_cleanup();
 #endif
-#if OPENSSL_VERSION_NUMBER >= 0x00907001
 CRYPTO_cleanup_all_ex_data();
-#endif
 ERR_remove_state(0);
 
 /* Don't call ERR_free_strings here; ERR_load_*_strings only
@@ -648,9 +644,7 @@ TCN_IMPLEMENT_CALL(jint, SSL, initialize
 #if HAVE_ENGINE_LOAD_BUILTIN_ENGINES
 ENGINE_load_builtin_engines();
 #endif
-#if OPENSSL_VERSION_NUMBER >= 0x00907001
 OPENSSL_load_builtin_modules();
-#endif
 
 /* Initialize thread support */
 ssl_thread_setup(tcn_global_pool);



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



Re: Reg: Bug 56438

2015-04-08 Thread Pravallika Peddi
Hi Mark,

*Fix for Pluggability Scan in Tomcat 7.0:  *



1)  Org.apache.catalina.startup.ContextConfig.java  à
processJarsForWebFragments(WebXml
application)



FragmentJarScannerCallback callback =

*new* FragmentJarScannerCallback(parseRequired);



jarScanner.scan(context.getServletContext(),

context.getLoader().getClassLoader(), callback,

*pluggabilityJarsToSkip*);



*if*(callback.scanFoundNoFragments()){

*log*.info(*sm*.getString("contextConfig.NoFragmentSummary"));

  }





2)  In Org.apache.catalina.startup.ContextConfig.java à
FragmentJarScannerCallback inner class:



Add new Boolean variable:

private boolean fragmentFoundInJar = false;



*Create a method to return the variable status.*

*public* *boolean* scanFoundNoFragments(){

*return* !fragmentFoundInJar;

}



Attached the class file with fix.


Thanks,

Pravallika(VIN)

On Sun, Mar 29, 2015 at 4:07 AM, Mark Thomas  wrote:

> On 26/03/2015 13:27, Pravallika Peddi wrote:
>
> 
>
> > 1) As mentioned in bug, in Tomcat7.0 catalina.properties file first 4
> > default jars(except jdom.jar) are missing:
> >   commons-discovery-*.jar,commons-el-*.jar,commons-net-*.jar
> >
> >  We can add them under
> > “tomcat.util.scan.DefaultJarScanner.jarsToSkip”
>
> jdom.jar isn't covered by the existing filters.
>
> 
>
> > 3)   3)  So I am planning to provide a fix as below for Tomcat
> 7.0
> > TLD scan:
>
> Looks OK so far.
>
> 
>
> > But in Tomcat 7.0, StandardJarScanner.scan  method only called from both
> > TldConfig.java and ContextConfig.java. So I am afraid I cannot add the
> > Summary message in Tomcat7.0. When User enables FINE  level then only
> they
> > can see the noTldInJar messages
>
> Look again. It certainly is possible to add the summary message for TLDs
> in Tomcat 7.
>
> > 4) Tomcat7.0 ContextConfig scan is taking less time, hence I feel we can
> > ignore it for now.
>
> I disagree. The pluggability scanning can add a significant start-up
> delay to web applications. The reason that the bug report was opened in
> the first place is the time taken for the pluggability scans.
>
> > Please let me know your opinion.
>
> I think you have some more research to do.
>
> Mark
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>

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

Re: svn commit: r1660953 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/catalina/connector/ java/org/apache/coyote/ajp/ java/org/apache/coyote/http11/ java/org/apache/tomcat/util/net/ java/org/apache/

2015-04-08 Thread Christopher Schultz
Mark,

On 2/24/15 12:59 PM, Mark Thomas wrote:
> On 19/02/2015 19:31, Christopher Schultz wrote:
>> Mark,
>>
>> On 2/19/15 1:41 PM, Mark Thomas wrote:
>>> On 19/02/2015 17:45, schu...@apache.org wrote:
 Author: schultz
 Date: Thu Feb 19 17:45:34 2015
 New Revision: 1660953

 URL: http://svn.apache.org/r1660953
 Log:
 Back-port r1660924 to fix 
 https://bz.apache.org/bugzilla/show_bug.cgi?id=57540
 Expose TLS protocol via a request attribute.
>>>
>>> Sorry for the delayed feedback.
>>>
>>> 
>>>
 @@ -882,7 +883,7 @@ public class Request
  if(attr != null) {
  return attr;
  }
 -if( isSSLAttribute(name) ) {
 +if( isSSLAttribute(name) || 
 name.equals(SSLSupport.PROTOCOL_VERSION_KEY)) {
>>>
>>> This should be part of the isSSLAttribute() test. I'd it to Globals to
>>> for consistency with the other attributes.
>>
>> I avoided adding it to isSSLAttribute because of this Javadoc for that
>> method:
>>
>> /**
>>  * Test if a given name is one of the special Servlet-spec SSL
>> attributes.
>>  */
>>
>> Since this isn't in the spec, I kept is separate. I think it's a
>> reasonable thing to add to the spec: any chance you'd be willing to
>> bring it to their attention?
> 
> If you raise the Jira I can comment positively on it. Better for two
> people to request it than one.

Created:
https://java.net/jira/browse/SERVLET_SPEC-130

Comments and votes appreciated.

Thanks,
-chris



signature.asc
Description: OpenPGP digital signature


svn commit: r1672100 - /tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java

2015-04-08 Thread remm
Author: remm
Date: Wed Apr  8 15:14:43 2015
New Revision: 1672100

URL: http://svn.apache.org/r1672100
Log:
- Add a vararg variant since it is probably nicer to use in a lot of cases (but 
keep the NIO2 variant as well since it is more flexible for array reuse).
- Add a block mode since it is trivial to do with the semaphore, it only adds 
an extra flag argument, and future user APIs might still have blocking IO.

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java?rev=1672100&r1=1672099&r2=1672100&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Wed Apr  8 
15:14:43 2015
@@ -1264,9 +1264,46 @@ public class Nio2Endpoint extends Abstra
  * behavior is used: the completion handler will be called as soon
  * as some data has been read, even if the read has completed inline.
  *
+ * @param block true to block until any pending read is done, if the
+ *timeout occurs and a read is still pending, a
+ *ReadPendingException will be thrown; false to
+ *not block but any pending read operation will cause
+ *a ReadPendingException
+ * @param timeout
+ * @param unit
+ * @param attachment
+ * @param check for the IO operation completion
+ * @param handler to call when the IO is complete
+ * @param dsts buffers
+ * @return the completion state (done, done inline, or still pending)
+ */
+// FIXME: @Override
+public  CompletionState read(boolean block, long timeout, TimeUnit 
unit, A attachment,
+CompletionCheck check, CompletionHandler 
handler,
+ByteBuffer... dsts) {
+if (dsts == null) {
+throw new IllegalArgumentException();
+}
+return read(dsts, 0, dsts.length, block, timeout, unit, 
attachment, check, handler);
+}
+
+/**
+ * Scatter read. The completion handler will be called once some
+ * data has been read or an error occurred. If a CompletionCheck
+ * object has been provided, the completion handler will only be
+ * called if the callHandler method returned true. If no
+ * CompletionCheck object has been provided, the ddefault NIO2
+ * behavior is used: the completion handler will be called as soon
+ * as some data has been read, even if the read has completed inline.
+ *
  * @param dsts buffers
  * @param offset in the buffer array
  * @param length in the buffer array
+ * @param block true to block until any pending read is done, if the
+ *timeout occurs and a read is still pending, a
+ *ReadPendingException will be thrown; false to
+ *not block but any pending read operation will cause
+ *a ReadPendingException
  * @param timeout
  * @param unit
  * @param attachment
@@ -1276,15 +1313,19 @@ public class Nio2Endpoint extends Abstra
  */
 // FIXME: @Override
 public  CompletionState read(ByteBuffer[] dsts, int offset, int 
length,
-long timeout, TimeUnit unit, A attachment,
+boolean block, long timeout, TimeUnit unit, A attachment,
 CompletionCheck check, CompletionHandler 
handler) {
 OperationState state = new OperationState<>(dsts, offset, 
length, timeout, unit, attachment, check, handler);
-if (readPending.tryAcquire()) {
-Nio2Endpoint.startInline();
-getSocket().read(dsts, offset, length, timeout, unit, state, 
new ScatterReadCompletionHandler<>());
-Nio2Endpoint.endInline();
-} else {
-throw new ReadPendingException();
+try {
+if ((!block && readPending.tryAcquire()) || (block && 
readPending.tryAcquire(timeout, unit))) {
+Nio2Endpoint.startInline();
+getSocket().read(dsts, offset, length, timeout, unit, 
state, new ScatterReadCompletionHandler<>());
+Nio2Endpoint.endInline();
+} else {
+throw new ReadPendingException();
+}
+} catch (InterruptedException e) {
+handler.failed(e, attachment);
 }
 return state.state;
 }
@@ -1306,9 +1347,47 @@ public class Nio2Endpoint extends Abstra
  * if the write is incomplete and data remains in the buffers, or
  * if the write completed inline.
  *
+

[Bug 57799] New: MessageCreationException: Couldn't create SOAP message with Nio2 connector protocol

2015-04-08 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=57799

Bug ID: 57799
   Summary: MessageCreationException: Couldn't create SOAP message
with Nio2 connector protocol
   Product: Tomcat 8
   Version: 8.0.15
  Hardware: PC
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: cry...@yahoo.com

Our SOAP client connects to our web service when Tomcat is configured with
default Nio connector protocol. With the new Nio 2 connector protocol, we get:

07-Apr-2015 08:17:06.166 SEVERE [http-nio2-8443-exec-10]
com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle Couldn't create
SOAP message due to exception: java.nio.channels.ReadPendingException
 com.sun.xml.ws.protocol.soap.MessageCreationException: Couldn't create SOAP
message due to exception: java.nio.channels.ReadPendingException
at
com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:363)
at
com.sun.xml.ws.transport.http.HttpAdapter.decodePacket(HttpAdapter.java:336)
at
com.sun.xml.ws.transport.http.HttpAdapter.access$400(HttpAdapter.java:96)
at
com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:591)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:259)
at
com.sun.xml.ws.transport.http.servlet.ServletAdapter.invokeAsync(ServletAdapter.java:213)
at
com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServletDelegate.java:159)
at
com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:194)
at
com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:80)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:644)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:537)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1085)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658)
at
org.apache.coyote.http11.Http11Nio2Protocol$Http11ConnectionHandler.process(Http11Nio2Protocol.java:176)
at
org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1087)
at
org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.run(Nio2Endpoint.java:1046)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
Caused by: java.nio.channels.ReadPendingException
at
org.apache.tomcat.util.net.SecureNio2Channel.read(SecureNio2Channel.java:610)
at
org.apache.coyote.http11.InternalNio2InputBuffer.fill(InternalNio2InputBuffer.java:223)
at
org.apache.coyote.http11.InternalNio2InputBuffer$SocketInputBuffer.doRead(InternalNio2InputBuffer.java:331)
at
org.apache.coyote.http11.filters.ChunkedInputFilter.readBytes(ChunkedInputFilter.java:314)
at
org.apache.coyote.http11.filters.ChunkedInputFilter.parseChunkHeader(ChunkedInputFilter.java:344)
at
org.apache.coyote.http11.filters.ChunkedInputFilter.doRead(ChunkedInputFilter.java:184)
at
org.apache.coyote.http11.AbstractInputBuffer.doRead(AbstractInputBuffer.java:413)
at org.apache.coyote.Request.doRead(Request.java:460)
at
org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:338)
at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:395)
at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:363)
at
org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:190)
at sun.nio.cs.StreamDecoder.readBytes(Unknown Source)
at sun.nio.cs.StreamDecoder.implRead(Unknown Source)

[Bug 57799] MessageCreationException: Couldn't create SOAP message with Nio2 connector protocol

2015-04-08 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=57799

Remy Maucherat  changed:

   What|Removed |Added

 OS||All

--- Comment #1 from Remy Maucherat  ---
It would need to be more reproduceable than this, and it probably means what it
means (there's a concurrent write) unless there's a glitch setting back the
pending flag, which seems doubtful. Something worth testing is dropping SSL to
compare with the vanilla NIO2 code.

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



buildbot success in ASF Buildbot on tomcat-trunk

2015-04-08 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/1108

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

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch tomcat/trunk] 1672100
Blamelist: remm

Build succeeded!

Sincerely,
 -The Buildbot




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



[Bug 57799] MessageCreationException: Couldn't create SOAP message with Nio2 connector protocol

2015-04-08 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=57799

--- Comment #2 from Justin  ---
There are no such problems when dropping SSL.

-- 
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: r1672140 - in /tomcat/native/trunk/native: include/ssl_private.h src/sslcontext.c src/sslext.c src/sslnetwork.c

2015-04-08 Thread markt
Author: markt
Date: Wed Apr  8 18:51:17 2015
New Revision: 1672140

URL: http://svn.apache.org/r1672140
Log:
First pass at native changes required to support ALPN.

Removed:
tomcat/native/trunk/native/src/sslext.c
Modified:
tomcat/native/trunk/native/include/ssl_private.h
tomcat/native/trunk/native/src/sslcontext.c
tomcat/native/trunk/native/src/sslnetwork.c

Modified: tomcat/native/trunk/native/include/ssl_private.h
URL: 
http://svn.apache.org/viewvc/tomcat/native/trunk/native/include/ssl_private.h?rev=1672140&r1=1672139&r2=1672140&view=diff
==
--- tomcat/native/trunk/native/include/ssl_private.h (original)
+++ tomcat/native/trunk/native/include/ssl_private.h Wed Apr  8 18:51:17 2015
@@ -256,10 +256,11 @@ struct tcn_ssl_ctxt_t {
 int verify_mode;
 tcn_pass_cb_t   *cb_data;
 
-/* for client: send request NPN.
- * for server: accept requested NPN.
+/* for client: List of protocols to request via ALPN.
+ * for server: List of protocols to accept via ALPN.
  */
-char *npn;
+char *alpn;
+int alpnlen;
 };
 
   

Modified: tomcat/native/trunk/native/src/sslcontext.c
URL: 
http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/sslcontext.c?rev=1672140&r1=1672139&r2=1672140&view=diff
==
--- tomcat/native/trunk/native/src/sslcontext.c (original)
+++ tomcat/native/trunk/native/src/sslcontext.c Wed Apr  8 18:51:17 2015
@@ -629,6 +629,153 @@ cleanup:
 return rv;
 }
 
+static int ssl_array_index(apr_array_header_t *array,
+   const char *s)
+{
+int i;
+for (i = 0; i < array->nelts; i++) {
+const char *p = APR_ARRAY_IDX(array, i, const char*);
+if (!strcmp(p, s)) {
+return i;
+}
+}
+return -1;
+}
+
+static int ssl_cmp_alpn_protos(apr_array_header_t *array,
+   const char *proto1,
+   const char *proto2)
+{
+int index1 = ssl_array_index(array, proto1);
+int index2 = ssl_array_index(array, proto2);
+if (index2 > index1) {
+return (index1 >= 0)? 1 : -1;
+}
+else if (index1 > index2) {
+return (index2 >= 0)? -1 : 1;
+}
+
+/* Both have the same index (-1 so neither listed by cient) compare
+ * the names so that spdy3 gets precedence over spdy2. That makes
+ * the outcome at least deterministic. */
+return strcmp((const char *)proto1, (const char *)proto2);
+}
+
+/*
+ * This callback function is executed when the TLS Application Layer
+ * Protocol Negotiate Extension (ALPN, RFC 7301) is triggered by the client
+ * hello, giving a list of desired protocol names (in descending preference)
+ * to the server.
+ * The callback has to select a protocol name or return an error if none of
+ * the clients preferences is supported.
+ * The selected protocol does not have to be on the client list, according
+ * to RFC 7301, so no checks are performed.
+ * The client protocol list is serialized as length byte followed by ascii
+ * characters (not null-terminated), followed by the next protocol name.
+ */
+int cb_server_alpn(SSL *ssl,
+   const unsigned char **out, unsigned char *outlen,
+   const unsigned char *in, unsigned int inlen, void *arg)
+{
+tcn_ssl_ctxt_t *tcsslctx = (tcn_ssl_ctxt_t *)arg;
+tcn_ssl_conn_t *con = (tcn_ssl_conn_t *)SSL_get_app_data(ssl);
+apr_array_header_t *client_protos;
+apr_array_header_t *proposed_protos;
+int i;
+unsigned short splen;
+
+printf("inlen [%d]\n", inlen);
+
+if (inlen == 0) {
+// Client specified an empty protocol list. Nothing to negotiate.
+return SSL_TLSEXT_ERR_ALERT_FATAL;
+}
+
+client_protos = apr_array_make(con->pool , 0, sizeof(char *));
+for (i = 0; i < inlen; /**/) {
+unsigned int plen = in[i++];
+if (plen + i > inlen) {
+// The protocol name extends beyond the declared length
+// of the protocol list.
+return SSL_TLSEXT_ERR_ALERT_FATAL;
+}
+APR_ARRAY_PUSH(client_protos, char*) = apr_pstrndup(con->pool, (const 
char *)in+i, plen);
+i += plen;
+}
+
+if (tcsslctx->alpn == NULL) {
+// Server supported protocol names not set.
+return SSL_TLSEXT_ERR_ALERT_FATAL;
+}
+
+if (tcsslctx->alpnlen == 0) {
+// Server supported protocols is an empty list
+return SSL_TLSEXT_ERR_ALERT_FATAL;
+}
+
+printf("A\n");
+
+proposed_protos = apr_array_make(con->pool, 0, sizeof(char *));
+for (i = 0; i < tcsslctx->alpnlen; /**/) {
+unsigned int plen = tcsslctx->alpn[i++];
+if (plen + i > tcsslctx->alpnlen) {
+// The protocol name extends beyond the declared length
+// of the protocol list.
+return SSL_TLSEXT_E

svn commit: r1672142 - in /tomcat/trunk/java/org/apache/tomcat/jni: SSLContext.java SSLExt.java SSLSocket.java socket/

2015-04-08 Thread markt
Author: markt
Date: Wed Apr  8 18:53:20 2015
New Revision: 1672142

URL: http://svn.apache.org/r1672142
Log:
JNI changes for newly added ALPN support in tomcat-native 1.2.x

Removed:
tomcat/trunk/java/org/apache/tomcat/jni/SSLExt.java
tomcat/trunk/java/org/apache/tomcat/jni/socket/
Modified:
tomcat/trunk/java/org/apache/tomcat/jni/SSLContext.java
tomcat/trunk/java/org/apache/tomcat/jni/SSLSocket.java

Modified: tomcat/trunk/java/org/apache/tomcat/jni/SSLContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/SSLContext.java?rev=1672142&r1=1672141&r2=1672142&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/jni/SSLContext.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/SSLContext.java Wed Apr  8 18:53:20 
2015
@@ -288,4 +288,5 @@ public final class SSLContext {
  */
 public static native void setVerify(long ctx, int level, int depth);
 
+public static native int setALPN(long ctx, byte[] proto, int len);
 }

Modified: tomcat/trunk/java/org/apache/tomcat/jni/SSLSocket.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/SSLSocket.java?rev=1672142&r1=1672141&r2=1672142&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/jni/SSLSocket.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/SSLSocket.java Wed Apr  8 18:53:20 
2015
@@ -107,4 +107,16 @@ public class SSLSocket {
 public static native int getInfoI(long sock, int id)
 throws Exception;
 
+
+/**
+ * Obtain the name of the protocol negotiated via ALPN. Only valid after 
the
+ * TLS handshake has completed.
+ *
+ * @param sock  Socket
+ * @param negotiatedProtocolByte array in which to store agreed 
protocol
+ *
+ * @return Length of agreed protocol. Zero means no protocol agreed.
+ */
+public static native int getALPN(long sock, byte[] negotiatedProtocol);
+
 }



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



svn commit: r1672143 - /tomcat/trunk/java/org/apache/tomcat/spdy/NetSupportOpenSSL.java

2015-04-08 Thread markt
Author: markt
Date: Wed Apr  8 18:54:00 2015
New Revision: 1672143

URL: http://svn.apache.org/r1672143
Log:
Remove class that no longer compiles

Removed:
tomcat/trunk/java/org/apache/tomcat/spdy/NetSupportOpenSSL.java


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



svn commit: r1672144 - /tomcat/trunk/java/org/apache/coyote/spdy/SpdyAprNpnHandler.java

2015-04-08 Thread markt
Author: markt
Date: Wed Apr  8 18:55:05 2015
New Revision: 1672144

URL: http://svn.apache.org/r1672144
Log:
Remove class that no longer compiles

Removed:
tomcat/trunk/java/org/apache/coyote/spdy/SpdyAprNpnHandler.java


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



Re: svn commit: r1672140 - in /tomcat/native/trunk/native: include/ssl_private.h src/sslcontext.c src/sslext.c src/sslnetwork.c

2015-04-08 Thread Mark Thomas
On 08/04/2015 19:51, ma...@apache.org wrote:
> Author: markt
> Date: Wed Apr  8 18:51:17 2015
> New Revision: 1672140
> 
> URL: http://svn.apache.org/r1672140
> Log:
> First pass at native changes required to support ALPN.

This is heavily based on a ALPN patch for HTTPD and Costin's SPDY work.

This works but as always when it comes to C code that I have put
together it needs careful review.

Mark

> 
> Removed:
> tomcat/native/trunk/native/src/sslext.c
> Modified:
> tomcat/native/trunk/native/include/ssl_private.h
> tomcat/native/trunk/native/src/sslcontext.c
> tomcat/native/trunk/native/src/sslnetwork.c
> 
> Modified: tomcat/native/trunk/native/include/ssl_private.h
> URL: 
> http://svn.apache.org/viewvc/tomcat/native/trunk/native/include/ssl_private.h?rev=1672140&r1=1672139&r2=1672140&view=diff
> ==
> --- tomcat/native/trunk/native/include/ssl_private.h (original)
> +++ tomcat/native/trunk/native/include/ssl_private.h Wed Apr  8 18:51:17 2015
> @@ -256,10 +256,11 @@ struct tcn_ssl_ctxt_t {
>  int verify_mode;
>  tcn_pass_cb_t   *cb_data;
>  
> -/* for client: send request NPN.
> - * for server: accept requested NPN.
> +/* for client: List of protocols to request via ALPN.
> + * for server: List of protocols to accept via ALPN.
>   */
> -char *npn;
> +char *alpn;
> +int alpnlen;
>  };
>  
>
> 
> Modified: tomcat/native/trunk/native/src/sslcontext.c
> URL: 
> http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/sslcontext.c?rev=1672140&r1=1672139&r2=1672140&view=diff
> ==
> --- tomcat/native/trunk/native/src/sslcontext.c (original)
> +++ tomcat/native/trunk/native/src/sslcontext.c Wed Apr  8 18:51:17 2015
> @@ -629,6 +629,153 @@ cleanup:
>  return rv;
>  }
>  
> +static int ssl_array_index(apr_array_header_t *array,
> +   const char *s)
> +{
> +int i;
> +for (i = 0; i < array->nelts; i++) {
> +const char *p = APR_ARRAY_IDX(array, i, const char*);
> +if (!strcmp(p, s)) {
> +return i;
> +}
> +}
> +return -1;
> +}
> +
> +static int ssl_cmp_alpn_protos(apr_array_header_t *array,
> +   const char *proto1,
> +   const char *proto2)
> +{
> +int index1 = ssl_array_index(array, proto1);
> +int index2 = ssl_array_index(array, proto2);
> +if (index2 > index1) {
> +return (index1 >= 0)? 1 : -1;
> +}
> +else if (index1 > index2) {
> +return (index2 >= 0)? -1 : 1;
> +}
> +
> +/* Both have the same index (-1 so neither listed by cient) compare
> + * the names so that spdy3 gets precedence over spdy2. That makes
> + * the outcome at least deterministic. */
> +return strcmp((const char *)proto1, (const char *)proto2);
> +}
> +
> +/*
> + * This callback function is executed when the TLS Application Layer
> + * Protocol Negotiate Extension (ALPN, RFC 7301) is triggered by the client
> + * hello, giving a list of desired protocol names (in descending preference)
> + * to the server.
> + * The callback has to select a protocol name or return an error if none of
> + * the clients preferences is supported.
> + * The selected protocol does not have to be on the client list, according
> + * to RFC 7301, so no checks are performed.
> + * The client protocol list is serialized as length byte followed by ascii
> + * characters (not null-terminated), followed by the next protocol name.
> + */
> +int cb_server_alpn(SSL *ssl,
> +   const unsigned char **out, unsigned char *outlen,
> +   const unsigned char *in, unsigned int inlen, void *arg)
> +{
> +tcn_ssl_ctxt_t *tcsslctx = (tcn_ssl_ctxt_t *)arg;
> +tcn_ssl_conn_t *con = (tcn_ssl_conn_t *)SSL_get_app_data(ssl);
> +apr_array_header_t *client_protos;
> +apr_array_header_t *proposed_protos;
> +int i;
> +unsigned short splen;
> +
> +printf("inlen [%d]\n", inlen);
> +
> +if (inlen == 0) {
> +// Client specified an empty protocol list. Nothing to negotiate.
> +return SSL_TLSEXT_ERR_ALERT_FATAL;
> +}
> +
> +client_protos = apr_array_make(con->pool , 0, sizeof(char *));
> +for (i = 0; i < inlen; /**/) {
> +unsigned int plen = in[i++];
> +if (plen + i > inlen) {
> +// The protocol name extends beyond the declared length
> +// of the protocol list.
> +return SSL_TLSEXT_ERR_ALERT_FATAL;
> +}
> +APR_ARRAY_PUSH(client_protos, char*) = apr_pstrndup(con->pool, 
> (const char *)in+i, plen);
> +i += plen;
> +}
> +
> +if (tcsslctx->alpn == NULL) {
> +// Server supported protocol names not set.
> +return SSL_TLSEXT_ERR_ALERT_FATAL;
> +}
> +
> +if (tcsslctx->alpnlen == 0) {
> +  

Re: svn commit: r1672143 - /tomcat/trunk/java/org/apache/tomcat/spdy/NetSupportOpenSSL.java

2015-04-08 Thread Mark Thomas
On 08/04/2015 19:54, ma...@apache.org wrote:
> Author: markt
> Date: Wed Apr  8 18:54:00 2015
> New Revision: 1672143
> 
> URL: http://svn.apache.org/r1672143
> Log:
> Remove class that no longer compiles

While I do think the SDPY classes will go from trunk eventually, I am
trying to keep as much as I can in trunk so I can refer to it when doing
the HTTP/2 implementation.

Mark


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



buildbot exception in ASF Buildbot on tomcat-trunk

2015-04-08 Thread buildbot
The Buildbot has detected a build exception on builder tomcat-trunk while 
building ASF Buildbot. Full details are available at:
http://ci.apache.org/builders/tomcat-trunk/builds/1109

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

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch tomcat/trunk] 1672144
Blamelist: markt

BUILD FAILED: exception upload_2

Sincerely,
 -The Buildbot




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



Re: svn commit: r1672068 - /tomcat/native/trunk/native/src/ssl.c

2015-04-08 Thread Christopher Schultz
Mark,

On 4/8/15 7:47 AM, ma...@apache.org wrote:
> Author: markt
> Date: Wed Apr  8 11:47:09 2015
> New Revision: 1672068
> 
> URL: http://svn.apache.org/r1672068
> Log:
> Remove unnecessary directives since the minimum OpenSSL version is 1.0.2

Maybe we want to include a preprocessor rule that kills the build if the
OpenSSL version is too old?

OTOH, configure should be able to tell that pre-build.

I just don't know how to do that myself ;)

-chris

> Modified:
> tomcat/native/trunk/native/src/ssl.c
> 
> Modified: tomcat/native/trunk/native/src/ssl.c
> URL: 
> http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/ssl.c?rev=1672068&r1=1672067&r2=1672068&view=diff
> ==
> --- tomcat/native/trunk/native/src/ssl.c (original)
> +++ tomcat/native/trunk/native/src/ssl.c Wed Apr  8 11:47:09 2015
> @@ -281,21 +281,17 @@ static apr_status_t ssl_init_cleanup(voi
>  /*
>   * Try to kill the internals of the SSL library.
>   */
> -#if OPENSSL_VERSION_NUMBER >= 0x00907001
>  /* Corresponds to OPENSSL_load_builtin_modules():
>   * XXX: borrowed from apps.h, but why not CONF_modules_free()
>   * which also invokes CONF_modules_finish()?
>   */
>  CONF_modules_unload(1);
> -#endif
>  /* Corresponds to SSL_library_init: */
>  EVP_cleanup();
>  #if HAVE_ENGINE_LOAD_BUILTIN_ENGINES
>  ENGINE_cleanup();
>  #endif
> -#if OPENSSL_VERSION_NUMBER >= 0x00907001
>  CRYPTO_cleanup_all_ex_data();
> -#endif
>  ERR_remove_state(0);
>  
>  /* Don't call ERR_free_strings here; ERR_load_*_strings only
> @@ -648,9 +644,7 @@ TCN_IMPLEMENT_CALL(jint, SSL, initialize
>  #if HAVE_ENGINE_LOAD_BUILTIN_ENGINES
>  ENGINE_load_builtin_engines();
>  #endif
> -#if OPENSSL_VERSION_NUMBER >= 0x00907001
>  OPENSSL_load_builtin_modules();
> -#endif
>  
>  /* Initialize thread support */
>  ssl_thread_setup(tcn_global_pool);
> 
> 
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 



signature.asc
Description: OpenPGP digital signature


svn commit: r1672150 - /tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Channel.java

2015-04-08 Thread markt
Author: markt
Date: Wed Apr  8 19:19:26 2015
New Revision: 1672150

URL: http://svn.apache.org/r1672150
Log:
Fix nit

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Channel.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Channel.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Channel.java?rev=1672150&r1=1672149&r2=1672150&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Channel.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Channel.java Wed Apr  8 
19:19:26 2015
@@ -138,7 +138,7 @@ public class Nio2Channel implements Asyn
 public  void read(ByteBuffer[] dsts,
 int offset, int length, long timeout, TimeUnit unit,
 A attachment, CompletionHandler handler) {
-sc.read(dsts, offset, length, timeout, unit, attachment, handler);;
+sc.read(dsts, offset, length, timeout, unit, attachment, handler);
 }
 
 @Override



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



svn commit: r1672157 - /tomcat/native/trunk/native/build/tcnative.m4

2015-04-08 Thread rjung
Author: rjung
Date: Wed Apr  8 20:00:48 2015
New Revision: 1672157

URL: http://svn.apache.org/r1672157
Log:
Update OpenSSL version check to 1.0.2.
Add output of found version in clear text.
Note: currently this check only warns,
if version is too old, it does not fail configure!

Modified:
tomcat/native/trunk/native/build/tcnative.m4

Modified: tomcat/native/trunk/native/build/tcnative.m4
URL: 
http://svn.apache.org/viewvc/tomcat/native/trunk/native/build/tcnative.m4?rev=1672157&r1=1672156&r2=1672157&view=diff
==
--- tomcat/native/trunk/native/build/tcnative.m4 (original)
+++ tomcat/native/trunk/native/build/tcnative.m4 Wed Apr  8 20:00:48 2015
@@ -236,16 +236,16 @@ AC_ARG_ENABLE(openssl-version-check,
 [Check OpenSSL Version @<:@default=yes@:>@])])
 case "$enable_openssl_version_check" in
 yes|'')
-AC_MSG_CHECKING(OpenSSL library version)
+AC_MSG_CHECKING(OpenSSL library version >= 1.0.2)
 AC_TRY_RUN([
 #include 
 #include 
 int main() {
-if (OPENSSL_VERSION_NUMBER >= 0x009080bfL)
+if (OPENSSL_VERSION_NUMBER >= 0x1000200fL)
 return (0);
-printf("\n\nFound   OPENSSL_VERSION_NUMBER %#010x\n",
+printf("\n\nFound   OPENSSL_VERSION_NUMBER %#010x (" OPENSSL_VERSION_TEXT 
")\n",
 OPENSSL_VERSION_NUMBER);
-printf("Require OPENSSL_VERSION_NUMBER 0x009080bf or greater 
(0.9.8k)\n\n");
+printf("Require OPENSSL_VERSION_NUMBER 0x1000200f or greater (1.0.2)\n\n");
 return (1);
 }
 ],



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



svn commit: r1672158 - /tomcat/native/trunk/native/build/rpm/tcnative.spec.in

2015-04-08 Thread rjung
Author: rjung
Date: Wed Apr  8 20:05:33 2015
New Revision: 1672158

URL: http://svn.apache.org/r1672158
Log:
Up our OpenSSL minimum version in spec file.

Modified:
tomcat/native/trunk/native/build/rpm/tcnative.spec.in

Modified: tomcat/native/trunk/native/build/rpm/tcnative.spec.in
URL: 
http://svn.apache.org/viewvc/tomcat/native/trunk/native/build/rpm/tcnative.spec.in?rev=1672158&r1=1672157&r2=1672158&view=diff
==
--- tomcat/native/trunk/native/build/rpm/tcnative.spec.in (original)
+++ tomcat/native/trunk/native/build/rpm/tcnative.spec.in Wed Apr  8 20:05:33 
2015
@@ -28,7 +28,7 @@ URL: http://apr.apache.org/
 Source0: %{name}-%{version}.tar.gz
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
 # XXX The part "apr-devel >= 0:{version}-{release}" is probably wrong
-BuildPrereq: autoconf, libtool, doxygen, apr-devel >= 0:{version}-{release}, 
openssl >= 0.9.8
+BuildPrereq: autoconf, libtool, doxygen, apr-devel >= 0:{version}-{release}, 
openssl >= 1.0.2
 
 %description
 The mission of the Tomcat Native Library (TCN) is to provide a
@@ -39,7 +39,7 @@ contains additional utility interfaces f
 Group: Development/Libraries
 Summary: Tomcat Native development kit
 # XXX The part "apr-devel >= 0:{version}-{release}" is probably wrong
-Requires: tcnative = %{version}-%{release}, apr-devel >= 
0:{version}-{release}, openssl-devel >= 0.9.8
+Requires: tcnative = %{version}-%{release}, apr-devel >= 
0:{version}-{release}, openssl-devel >= 1.0.2
 
 %description devel
 The mission of the Tomcat Native Library (TCN) is to provide a



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



Re: svn commit: r1672068 - /tomcat/native/trunk/native/src/ssl.c

2015-04-08 Thread Rainer Jung

Am 08.04.2015 um 21:00 schrieb Christopher Schultz:

Mark,

On 4/8/15 7:47 AM, ma...@apache.org wrote:

Author: markt
Date: Wed Apr  8 11:47:09 2015
New Revision: 1672068

URL: http://svn.apache.org/r1672068
Log:
Remove unnecessary directives since the minimum OpenSSL version is 1.0.2


Maybe we want to include a preprocessor rule that kills the build if the
OpenSSL version is too old?

OTOH, configure should be able to tell that pre-build.

I just don't know how to do that myself ;)


configure already contains such a check. I updated it from 0.9.8k to 
1.0.2 in r1672157.


- The check does not apply to Windows builds (no configure run)

- The check does not apply to runtime problems

- The check currently does not fail fatally, but only warn. I think we 
should let it fail, if the version is too old.


Regards,

Rainer

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



HTTP/2 progress report

2015-04-08 Thread Mark Thomas
As of r1672190 we now have the following:

- ALPN support in tc-native trunk
- The ability to register upgrade protocol implementations that will:
  - be included in the ALPN negotiation
  - cause processing to be passed to a protocol dedicated processor
implementation once ALPN negotiation completes

I have tested this with h2 and it works - up until the point where
processing passes to the HTTP/2 processor. Since that processor is only
a dummy implementation the connection dies at that point.

This is intended to be extensible. If, for example, WebSocket is added
to the IANA registry for ALPN (I'm not sure if it will be or not) then
it should be relatively simple to add the plumbing to Tomcat to make
that work.

I'm still thinking where about in the processing chain to insert the
check for HTTP upgrade. It could be as early as the Adapter or as late
as the ContextContextValve.

I have been considering refactoring WebSocket to use this new HTTP
upgrade process - whatever it becomes - but I think - on balance - it
makes sense not to. They are fundamentally different.
- HTTP upgrade for h2c happens irrespective of the URL being requested.
- HTTP upgrade for WebSocket only happens if the upgrade request is for
a valid URL.

Given this, I am leaning towards the new HTTP upgrade mechanism (the one
that will be used by h2c) being earlier rather than later in the
processing chain.

Next steps are:
- start to flesh out the Http2Processor implementation
- provide a 1.2.0-dev build of tc-native for Windows (assuming folks
want one and can't built it themselves)

Mark

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



svn commit: r1672177 - in /tomcat/trunk/java/org/apache: coyote/ coyote/ajp/ coyote/http11/ coyote/http2/ coyote/spdy/ tomcat/util/net/

2015-04-08 Thread markt
Author: markt
Date: Wed Apr  8 20:57:56 2015
New Revision: 1672177

URL: http://svn.apache.org/r1672177
Log:
First pass at the plumbing to link from ALPN to creating a protocol specific 
processor to handle the connection. Some, but not all, of the plumbing that 
will be required for HTTP upgrade is also provided.

Added:
tomcat/trunk/java/org/apache/coyote/UpgradeProtocol.java   (with props)
tomcat/trunk/java/org/apache/coyote/http2/Http2Protocol.java   (with props)
tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java   (with 
props)
Modified:
tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java
tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProtocol.java
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
tomcat/trunk/java/org/apache/coyote/spdy/SpdyProxyProtocol.java
tomcat/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/LocalStrings.properties
tomcat/trunk/java/org/apache/tomcat/util/net/SocketWrapperBase.java

Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java?rev=1672177&r1=1672176&r2=1672177&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java Wed Apr  8 
20:57:56 2015
@@ -365,6 +365,15 @@ public abstract class AbstractProtocolhttp://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/UpgradeProtocol.java?rev=1672177&view=auto
==
--- tomcat/trunk/java/org/apache/coyote/UpgradeProtocol.java (added)
+++ tomcat/trunk/java/org/apache/coyote/UpgradeProtocol.java Wed Apr  8 
20:57:56 2015
@@ -0,0 +1,62 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.coyote;
+
+import org.apache.tomcat.util.net.SocketWrapperBase;
+
+public interface UpgradeProtocol {
+
+/**
+ * @return The name that clients will use to request an upgrade to this
+ * protocol via an HTTP/1.1 upgrade request or null if
+ * upgrade via an HTTP/1.1 upgrade request is not supported.
+ */
+public String getHttpUpgradeName();
+
+/**
+ * @return The byte sequence as listed in the IANA registry for this
+ * protocol or null if upgrade via ALPN is not
+ * supported.
+ */
+public byte[] getAlpnIdentifier();
+
+/**
+ * @return The name of the protocol as listed in the IANA registry if and
+ * only if {@link #getAlpnIdentifier()} returns the UTF-8 encoding
+ * of this name. If {@link #getAlpnIdentifier()} returns some other
+ * byte sequence, then this method returns the empty string. If
+ * upgrade via ALPN is not supported then null is
+ * returned.
+ */
+/*
+ * Implementation note: If Tomcat ever supports ALPN for a protocol where
+ *  the identifier is not the UTF-8 encoding of the 
name
+ *  then some refactoring is going to be required.
+ *
+ * Implementation note: Tomcat assumes that the UTF-8 encoding of this name
+ *  will not exceed 255 bytes. Tomcat's behaviour if
+ *  longer names are used is undefined.
+ */
+public String getAlpnName();
+
+/**
+ *
+ * @return A processor instance for processing a connection using this
+ * protocol.
+ */
+public Processor getProcessor(SocketWrapperBase socketWrapper);
+}

Propchange: tomcat/trunk/java/org/apache/coyote/UpgradeProtocol.java
--
svn:eol-style = native

Propchange: tomcat/trunk/java/org/apache/coyote/UpgradeProtocol.java
--
svn:mime-type = text/plain

Modified: tomcat/trunk/java/org/apache/coy

svn commit: r1672190 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

2015-04-08 Thread markt
Author: markt
Date: Wed Apr  8 21:29:05 2015
New Revision: 1672190

URL: http://svn.apache.org/r1672190
Log:
Fix a crash when I put it all together. Get the negotiated protocol after the 
handshake.

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

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1672190&r1=1672189&r2=1672190&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Wed Apr  8 
21:29:05 2015
@@ -832,7 +832,8 @@ public class AprEndpoint extends Abstrac
 /**
  * Process the specified connection.
  */
-protected boolean setSocketOptions(long socket) {
+protected boolean setSocketOptions(SocketWrapperBase socketWrapper) {
+long socket = socketWrapper.getSocket().longValue();
 // Process the connection
 int step = 1;
 try {
@@ -854,8 +855,20 @@ public class AprEndpoint extends Abstrac
 }
 return false;
 }
-}
 
+if (negotiableProtocols.size() > 0) {
+byte[] negotiated = new byte[256];
+int len = SSLSocket.getALPN(socket, negotiated);
+String negotiatedProtocol =
+new String(negotiated, 0, len, 
StandardCharsets.UTF_8);
+if (negotiatedProtocol.length() > 0) {
+
socketWrapper.setNegotiatedProtocol(negotiatedProtocol);
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("endpoint.alpn.negotiated", 
negotiatedProtocol));
+}
+}
+}
+}
 } catch (Throwable t) {
 ExceptionUtils.handleThrowable(t);
 if (log.isDebugEnabled()) {
@@ -906,18 +919,6 @@ public class AprEndpoint extends Abstrac
 wrapper.setSecure(isSSLEnabled());
 wrapper.setReadTimeout(getSoTimeout());
 wrapper.setWriteTimeout(getSoTimeout());
-if (isSSLEnabled() && negotiableProtocols.size() > 0) {
-byte[] negotiated = new byte[256];
-int len = SSLSocket.getALPN(socket, negotiated);
-String negotiatedProtocol =
-new String(negotiated, 0, len, 
StandardCharsets.UTF_8);
-if (negotiatedProtocol.length() > 0) {
-wrapper.setNegotiatedProtocol(negotiatedProtocol);
-if (log.isDebugEnabled()) {
-log.debug(sm.getString("endpoint.alpn.negotiated", 
negotiatedProtocol));
-}
-}
-}
 connections.put(Long.valueOf(socket), wrapper);
 getExecutor().execute(new SocketWithOptionsProcessor(wrapper));
 }
@@ -2359,7 +2360,7 @@ public class AprEndpoint extends Abstrac
 
 synchronized (socket) {
 if (!deferAccept) {
-if (setSocketOptions(socket.getSocket().longValue())) {
+if (setSocketOptions(socket)) {
 getPoller().add(socket.getSocket().longValue(),
 getSoTimeout(), Poll.APR_POLLIN);
 } else {
@@ -2369,7 +2370,7 @@ public class AprEndpoint extends Abstrac
 }
 } else {
 // Process the request from this socket
-if (!setSocketOptions(socket.getSocket().longValue())) {
+if (!setSocketOptions(socket)) {
 // Close socket and pool
 closeSocket(socket.getSocket().longValue());
 socket = null;



-
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

2015-04-08 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/

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

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch tomcat/trunk] 1672177
Blamelist: markt

Build succeeded!

Sincerely,
 -The Buildbot




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



[GUMP@vmgump]: Project tomcat-tc8.0.x (in module tomcat-8.0.x) failed

2015-04-08 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-tc8.0.x has an issue affecting its community integration.
This issue affects 4 projects,
 and has been outstanding for 3 runs.
The current state of this project is 'Failed', with reason 'Missing Build 
Outputs'.
For reference only, the following projects are affected by this:
- tomcat-tc8.0.x :  Tomcat 8.x, a web server implementing the Java Servlet 
3.1,
...
- tomcat-tc8.0.x-test-bio :  Tomcat 8.x, a web server implementing the Java 
Servlet 3.1,
...
- tomcat-tc8.0.x-test-nio :  Tomcat 8.x, a web server implementing the Java 
Servlet 3.1,
...
- tomcat-tc8.0.x-test-nio2 :  Tomcat 8.x, a web server implementing the 
Java Servlet 3.1,
...


Full details are available at:
http://vmgump.apache.org/gump/public/tomcat-8.0.x/tomcat-tc8.0.x/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -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 junit exists, no need to add for property junit.jar.
 -INFO- Made directory [/srv/gump/public/workspace/tomcat-8.0.x/tomcat-deps]
 -INFO- Failed with reason missing build outputs
 -ERROR- Missing Output: 
/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/tomcat-spdy.jar
 -ERROR- See Directory Listing Work for Missing Outputs
 -DEBUG- Extracted fallback artifacts from Gump Repository



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-8.0.x/tomcat-tc8.0.x/gump_work/build_tomcat-8.0.x_tomcat-tc8.0.x.html
Work Name: build_tomcat-8.0.x_tomcat-tc8.0.x (Type: Build)
Work ended in a state of : Success
Elapsed: 1 min 43 secs
Command Line: /usr/lib/jvm/java-8-oracle/bin/java -Djava.awt.headless=true 
-Dbuild.sysclasspath=only org.apache.tools.ant.Main 
-Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/R-4.4-201406061215/ecj-4.4.jar 
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20150409-native-src.tar.gz
 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20150409-native-src.tar.gz
 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20150409.jar
 -Djunit.jar=/srv/gump/public/workspace/junit/target/junit-4.13-SNAPSHOT.jar 
[Working Directory: /srv/gump/public/workspace/tomcat-8.0.x]
CLASSPATH: 
/usr/lib/jvm/java-8-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/classes:/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-junit4.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/junit/target/junit-4.13-SNAPSHOT.jar:/srv/gump/packages/eclipse/plugins/R-4.4-201406061215/ecj-4.4.jar:/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20150409.jar
-
[mkdir] Created dir: 
/srv/gump/public/workspace/tomcat-8.0.x/output/jdbc-pool/build
[mkdir] Created dir: 
/srv/gump/public/workspace/tomcat-8.0.x/output/jdbc-pool/classes
[mkdir] Created dir: 
/srv/gump/public/workspace/tomcat-8.0.x/output/jdbc-pool/testclasses
 [copy] Copying 7 files to 
/srv/gump/public/workspace/tomcat-8.0.x/output/jdbc-pool

download:

build-src:
  [jar] Building jar: 
/srv/gump/public/workspace/tomcat-8.0.x/output/jdbc-pool/tomcat-jdbc-src.jar

build:
[javac] Compiling 32 source files to 
/srv/gump/public/workspace/tomcat-8.0.x/output/jdbc-pool/classes
  [jar] Building jar: 
/srv/gump/public/workspace/tomcat-8.0.x/output/jdbc-pool/tomcat-jdbc.jar
 [copy] Copying 1 file to 
/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib

compile-webapp-examples:
[mkdir] Created dir: 
/srv/gump/public/workspace/tomcat-8.0.x/output/build/webapps/examples/WEB-INF/classes
[javac] Compiling 72 source files to 
/srv/gump/public/workspace/tomcat-8.0.x/output/build/webapps/examples/WEB-INF/classes
[mkdir] Created dir: 
/srv/gump/public/workspace/tomcat-8.0.x/output/build/webapps/examples/jsp/plugin/applet
[javac] Compiling 1 source file to 
/srv/gump/public/workspace/tomcat-8.0.x/output/build/webapps/examples/jsp/plugin/applet

deploy:
 [copy] Copyi

svn commit: r1672204 - in /tomcat/trunk/java/org/apache/coyote: AbstractProtocol.java LocalStrings.properties

2015-04-08 Thread markt
Author: markt
Date: Wed Apr  8 21:56:15 2015
New Revision: 1672204

URL: http://svn.apache.org/r1672204
Log:
Make creation of upgrade Processor more robust. Fail the connection if the 
expected Processor cannot be created.

Modified:
tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java
tomcat/trunk/java/org/apache/coyote/LocalStrings.properties

Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java?rev=1672204&r1=1672203&r2=1672204&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/AbstractProtocol.java Wed Apr  8 
21:56:15 2015
@@ -649,6 +649,14 @@ public abstract class AbstractProtocolhttp://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/LocalStrings.properties?rev=1672204&r1=1672203&r2=1672204&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/LocalStrings.properties (original)
+++ tomcat/trunk/java/org/apache/coyote/LocalStrings.properties Wed Apr  8 
21:56:15 2015
@@ -15,6 +15,7 @@
 abstractConnectionHandler.error=Error reading request, ignored
 abstractConnectionHandler.ioexception.debug=IOExceptions are normal, ignored
 abstractConnectionHandler.socketexception.debug=SocketExceptions are normal, 
ignored
+abstractConnectionHandler.negotiatedProcessor.fail=Failed to create Processor 
for negotiated protocol [{0}]
 
 abstractProcessor.nonContainerThreadError=An error occurred in processing 
while on a non-container thread. The connection will be closed immediately
 



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



buildbot exception in ASF Buildbot on tomcat-trunk

2015-04-08 Thread buildbot
The Buildbot has detected a build exception on builder tomcat-trunk while 
building ASF Buildbot. Full details are available at:
http://ci.apache.org/builders/tomcat-trunk/builds/1112

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

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch tomcat/trunk] 1672204
Blamelist: markt

BUILD FAILED: exception upload_2

Sincerely,
 -The Buildbot




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