svn commit: r1708643 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/tomcat/jni/Socket.java

2015-10-14 Thread fschumacher
Author: fschumacher
Date: Wed Oct 14 16:15:24 2015
New Revision: 1708643

URL: http://svn.apache.org/viewvc?rev=1708643=rev
Log:
javadocs: Use html entities for less than, greater than
and greater or equal.

Merge r1708501 from /tomcat/trunk

Modified:
tomcat/tc8.0.x/trunk/   (props changed)
tomcat/tc8.0.x/trunk/java/org/apache/tomcat/jni/Socket.java

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Oct 14 16:15:24 2015
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
 
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1649973,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655351,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657
 
609,1657682,1657907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1666387,1666494,1666496,1666552,1666569,1666579,1
 
37,149,1666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681697,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-1684527,1684549-1684550,1685556,1685591,1685739,1685744,168577
 

svn commit: r1708607 - in /tomcat/trunk/java/org/apache/coyote/http2: Http2UpgradeHandler.java LocalStrings.properties Stream.java

2015-10-14 Thread markt
Author: markt
Date: Wed Oct 14 14:37:34 2015
New Revision: 1708607

URL: http://svn.apache.org/viewvc?rev=1708607=rev
Log:
Complete some i18n TODOs

Modified:
tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java
tomcat/trunk/java/org/apache/coyote/http2/LocalStrings.properties
tomcat/trunk/java/org/apache/coyote/http2/Stream.java

Modified: tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java?rev=1708607=1708606=1708607=diff
==
--- tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java Wed Oct 
14 14:37:34 2015
@@ -640,9 +640,9 @@ public class Http2UpgradeHandler extends
 do {
 synchronized (this) {
 if (!stream.canWrite()) {
-throw new IOException("TODO i18n: Stream not 
writeable");
+throw new 
IOException(sm.getString("upgradeHandler.stream.notWritable",
+stream.getConnectionId(), 
stream.getIdentifier()));
 }
-
 long windowSize = getWindowSize();
 if (windowSize < 1 || backLogSize > 0) {
 // Has this stream been granted an allocation

Modified: tomcat/trunk/java/org/apache/coyote/http2/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/LocalStrings.properties?rev=1708607=1708606=1708607=diff
==
--- tomcat/trunk/java/org/apache/coyote/http2/LocalStrings.properties (original)
+++ tomcat/trunk/java/org/apache/coyote/http2/LocalStrings.properties Wed Oct 
14 14:37:34 2015
@@ -66,8 +66,10 @@ pingManager.roundTripTime=Connection [{0
 
 stream.closed=Connection [{0}], Stream [{1}], Unable to write to stream once 
it has been closed
 stream.header.debug=Connection [{0}], Stream [{1}], HTTP header [{2}], Value 
[{3}]
+stream.notWritable=Connection [{0}], Stream [{1}], This stream is not writable
 stream.reprioritisation.debug=Connection [{0}], Stream [{1}], Exclusive [{2}], 
Parent [{3}], Weight [{4}]
 stream.reset.debug=Connection [{0}], Stream [{1}], Reset due to [{2}]
+stream.reset.fail=Connection [{0}], Stream [{1}], Failed to reset stream
 stream.write=Connection [{0}], Stream [{1}]
 
 stream.outputBuffer.flush.debug=Connection [{0}], Stream [{1}], flushing 
output with buffer at position [{2}], writeInProgress [{3}] and closed [{4}]
@@ -104,6 +106,7 @@ upgradeHandler.sendPrefaceFail=Failed to
 upgradeHandler.socketCloseFailed=Error closing socket
 upgradeHandler.stream.closed=Stream [{0}] has been closed for some time
 upgradeHandler.stream.even=A new remote stream ID of [{0}] was requested but 
all remote streams must use odd identifiers
+upgradeHandler.stream.notWritable=Connection [{0}], Stream [{1}], This stream 
is not writable
 upgradeHandler.stream.old=A new remote stream ID of [{0}] was requested but 
the most recent stream was [{1}]
 upgradeHandler.tooManyRemoteStreams=The client attempted to use more than 
[{0}] active streams
 upgradeHandler.unexpectedAck=Connection [{0}], Stream [{1}], A settings 
acknowledgement was received when not expected

Modified: tomcat/trunk/java/org/apache/coyote/http2/Stream.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/Stream.java?rev=1708607=1708606=1708607=diff
==
--- tomcat/trunk/java/org/apache/coyote/http2/Stream.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http2/Stream.java Wed Oct 14 14:37:34 
2015
@@ -146,7 +146,8 @@ public class Stream extends AbstractStre
 long windowSize = getWindowSize();
 while (windowSize < 1) {
 if (!canWrite()) {
-throw new IOException("TODO i18n: Stream not writeable");
+throw new IOException(sm.getString("stream.notWritable", 
getConnectionId(),
+getIdentifier()));
 }
 try {
 if (block) {
@@ -367,8 +368,8 @@ public class Stream extends AbstractStre
 try {
 handler.resetStream((StreamException) http2Exception);
 } catch (IOException ioe) {
-// TODO i18n
-ConnectionException ce = new ConnectionException("", 
Http2Error.PROTOCOL_ERROR);
+ConnectionException ce = new ConnectionException(
+sm.getString("stream.reset.fail"), 
Http2Error.PROTOCOL_ERROR);
 ce.initCause(ioe);
 handler.closeConnection(ce);
 }



-
To unsubscribe, e-mail: 

Re: [VOTE] Release Apache Tomcat 7.0.65

2015-10-14 Thread Violeta Georgieva
2015-10-09 14:04 GMT+03:00 Violeta Georgieva :
>
> The proposed Apache Tomcat 7.0.65 release is now available for voting.
>
> It can be obtained from:
> https://dist.apache.org/repos/dist/dev/tomcat/tomcat-7/v7.0.65/
> The Maven staging repo is:
> https://repository.apache.org/content/repositories/orgapachetomcat-1053/
> The svn tag is:
> http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_65/
>
> The proposed 7.0.65 release is:
> [ ] Broken - do not release
> [X] Stable - go ahead and release as 7.0.65 Stable

Tested Tomcat in OSGi environment - successful.
Basic performance tests - successful.

> Regards,
> Violeta


buildbot success in ASF Buildbot on tomcat-trunk

2015-10-14 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/440

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



svn commit: r1708641 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/catalina/tribes/membership/Membership.java

2015-10-14 Thread fschumacher
Author: fschumacher
Date: Wed Oct 14 16:13:56 2015
New Revision: 1708641

URL: http://svn.apache.org/viewvc?rev=1708641=rev
Log:
javadoc: Correct closing of code tag.

Merge r1708500 from /tomcat/trunk

Modified:
tomcat/tc8.0.x/trunk/   (props changed)

tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/Membership.java

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Oct 14 16:13:56 2015
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
 
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1649973,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655351,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657
 
609,1657682,1657907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1666387,1666494,1666496,1666552,1666569,1666579,1
 
37,149,1666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681697,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-1684527,1684549-1684550,1685556,1685591,1685739,1685744,168577
 

buildbot failure in ASF Buildbot on tomcat-trunk

2015-10-14 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-trunk while building 
ASF Buildbot. Full details are available at:
http://ci.apache.org/builders/tomcat-trunk/builds/439

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] 1708605
Blamelist: markt

BUILD FAILED: failed compile_1

Sincerely,
 -The Buildbot




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



RE: Consider support for the Servlet profile of JSR 196 (JASPIC) in Tomcat 7.0.x

2015-10-14 Thread gradstud
Is there any way you can use another email then this one to have your 
conversations? Thank you!

-Original Message-
From: Arjan Tijms [mailto:arjan.ti...@gmail.com] 
Sent: Wednesday, October 14, 2015 6:01 AM
To: dev@tomcat.apache.org
Subject: Re: Consider support for the Servlet profile of JSR 196 (JASPIC) in 
Tomcat 7.0.x

Hi there,

Haven't seen updates for some time here. Wonder what the current status is and 
what exactly happened in the last months. Last commits in the Tomcat repo are 
from 3 months ago.

Kind regards,
Arjan Tijms



On Thu, Jun 11, 2015 at 10:39 AM, markt [via Tomcat] 
 wrote:
> On 10/06/2015 16:43, Arjan Tijms wrote:
>
>> Hi,
>>
>> On Wed, Jun 10, 2015 at 3:28 PM, markt [via Tomcat] < [hidden email]> 
>> wrote:
>>
>>> I don't really understand what the requirement is here. Can you 
>>> expand / point me to the part of the spec?
>>>
>>
>> It's simply that from within a SAM you can forward/include to a 
>> Servlet using a dispatcher, such that the output of that Servlet is 
>> inserted in the response.
>
> Thanks for the clarification. You can do that easily from a Valve in a 
> couple of lines of code. No need for extra internal plumbing that I can see.
>
> Mark
>
>>
>> It's in section 3.8.3.4 of the JASPIC spec:
>>
>>
>> "3.8.3.4
>> Forwards and Includes by Server Authentication Modules
>>
>> The message processing runtime must support the acquisition and use 
>> of RequestDispatcher objects by authentication modules within their 
>> processing of validateRequest.
>>
>> Under the constraints defined by RequestDispatcher, authentication 
>> modules must be able to forward and include using the request and 
>> response objects passed in MessageInfo. In particular, an 
>> authentication module must be able to acquire a RequestDispatcher 
>> from the request obtained from MessageInfo, and uses it to forward 
>> the request (and response) to a login form.
>> Authentication modules should catch and rethrow as an AuthException 
>> any exception thrown by these methods."
>>
>>
>> A test/example showing this in practice is the following:
>>
>>
>> https://github.com/javaee-samples/javaee7-samples/tree/master/jaspic/
>> dispatching
>>
>> Specifically, this code shows both an include and a forward done by a SAM:
>>
>>   public AuthStatus validateRequest(MessageInfo messageInfo, Subject 
>> clientSubject, Subject serviceSubject) throws AuthException {
>> try {
>> HttpServletRequest request = (HttpServletRequest) 
>> messageInfo.getRequestMessage();
>> HttpServletResponse response = (HttpServletResponse) 
>> messageInfo.getResponseMessage();
>>
>> if ("include".equals(request.getParameter("dispatch"))) {
>> request.getRequestDispatcher("/includedServlet")
>>.include(request, response);
>>
>> // "Do nothing", required protocol when returning SUCCESS
>> handler.handle(new Callback[] { new 
>> CallerPrincipalCallback(clientSubject, (Principal) null) });
>>
>> // When using includes, the response stays open and 
>> the main
>> // resource can also write to the response
>> return SUCCESS;
>>
>> } else {
>> request.getRequestDispatcher("/forwardedServlet")
>>.forward(request, response);
>>
>> // MUST NOT invoke the resource, so CAN NOT return 
>> SUCCESS here.
>> return SEND_CONTINUE;
>> }
>>
>> } catch (IOException | ServletException | 
>> UnsupportedCallbackException e) {
>> throw (AuthException) new AuthException().initCause(e);
>> }
>> }
>>
>>
>> Sounds good. Thanks for the tip.
>>>
>>
>> You're welcome ;)
>>
>> Kind regards,
>> Arjan Tijms
>>
>>
>>
>>
>>>
>>> Cheers,
>>>
>>> mark
>>>
>>> 
>>> - To unsubscribe, e-mail: [hidden email] 
>>> 
>>> For additional commands, e-mail: [hidden email] 
>>> 
>>>
>>>
>>>
>>> --
>>>  If you reply to this email, your message will be added to the 
>>> discussion
>>> below:
>>>
>>>
>>> http://tomcat.10.x6.nabble.com/Consider-support-for-the-Servlet-prof
>>> ile-of-JSR-196-JASPIC-in-Tomcat-7-0-x-tp4993387p5035887.html
>>>  To unsubscribe from Consider support for the Servlet profile of JSR 
>>> 196
>>> (JASPIC) in Tomcat 7.0.x, click here < .
>>> NAML
>>>
>>> >> _viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.names
>>> paces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble
>>> .view.web.template.NodeNamespace=notify_subscribers%21na
>>> bble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_
>>> email%21nabble%3Aemail.naml>
>>>
>>
>>
>>
>>
>> 

svn commit: r1708605 - in /tomcat/trunk: java/javax/servlet/http/ java/org/apache/catalina/core/ java/org/apache/coyote/ java/org/apache/coyote/ajp/ java/org/apache/coyote/http11/ java/org/apache/coyo

2015-10-14 Thread markt
Author: markt
Date: Wed Oct 14 14:29:31 2015
New Revision: 1708605

URL: http://svn.apache.org/viewvc?rev=1708605=rev
Log:
Implement a very basic (you can only specify the path at the moment) server 
push mechanism.
Add an example to the examples web app that shows how to use it.

Added:
tomcat/trunk/webapps/examples/WEB-INF/classes/http2/
tomcat/trunk/webapps/examples/WEB-INF/classes/http2/SimpleImagePush.java   
(with props)
Modified:
tomcat/trunk/java/javax/servlet/http/PushBuilder.java
tomcat/trunk/java/org/apache/catalina/core/ApplicationPushBuilder.java
tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties
tomcat/trunk/java/org/apache/coyote/ActionCode.java
tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java
tomcat/trunk/java/org/apache/coyote/ajp/LocalStrings.properties
tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java
tomcat/trunk/java/org/apache/coyote/http11/LocalStrings.properties
tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java
tomcat/trunk/java/org/apache/coyote/http2/LocalStrings.properties
tomcat/trunk/java/org/apache/coyote/http2/Stream.java
tomcat/trunk/java/org/apache/coyote/http2/StreamProcessor.java
tomcat/trunk/webapps/examples/WEB-INF/web.xml
tomcat/trunk/webapps/examples/servlets/index.html

Modified: tomcat/trunk/java/javax/servlet/http/PushBuilder.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/http/PushBuilder.java?rev=1708605=1708604=1708605=diff
==
--- tomcat/trunk/java/javax/servlet/http/PushBuilder.java (original)
+++ tomcat/trunk/java/javax/servlet/http/PushBuilder.java Wed Oct 14 14:29:31 
2015
@@ -18,9 +18,32 @@ package javax.servlet.http;
 
 /**
  * Builds a push request based on the {@link HttpServletRequest} from which 
this
- * builder was obtained.
+ * builder was obtained. The push request will be constructed on the following
+ * basis:
+ * 
+ * The request method is set to GET
+ * The path will not be set. This must be set explicitly via a call to
+ * {@link #setPath(String)}
+ * 
  *
  * @since Servlet 4.0
  */
 public interface PushBuilder {
+
+/**
+ * Sets the URI path to be used for the push request. This must be called
+ * before every call to {@link #push()}. If the path includes a query
+ * string, the query string will be appended to the existing query string
+ * (if any) and no de-duplication will occur.
+ *
+ * @param path Paths beginning with '/' are treated as absolute paths. All
+ * other paths are treated as relative to the context path of
+ * the request used to create this builder instance. The path
+ * may include a query string.
+ *
+ * @return This builder instance
+ */
+PushBuilder setPath(String path);
+
+void push();
 }

Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationPushBuilder.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationPushBuilder.java?rev=1708605=1708604=1708605=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/ApplicationPushBuilder.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/ApplicationPushBuilder.java Wed 
Oct 14 14:29:31 2015
@@ -16,14 +16,73 @@
  */
 package org.apache.catalina.core;
 
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletRequestWrapper;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.PushBuilder;
 
+import org.apache.catalina.connector.Request;
+import org.apache.coyote.ActionCode;
+import org.apache.tomcat.util.res.StringManager;
+
 public class ApplicationPushBuilder implements PushBuilder {
 
+private static final StringManager sm = 
StringManager.getManager(ApplicationPushBuilder.class);
+
 private final HttpServletRequest baseRequest;
+private final org.apache.coyote.Request coyoteRequest;
+
+private String path;
 
 public ApplicationPushBuilder(HttpServletRequest request) {
 baseRequest = request;
+// Need a reference to the CoyoteRequest in order to process the push
+ServletRequest current = request;
+while (current instanceof ServletRequestWrapper) {
+current = ((ServletRequestWrapper) current).getRequest();
+}
+if (current instanceof Request) {
+coyoteRequest = ((Request) current).getCoyoteRequest();
+} else {
+throw new UnsupportedOperationException(sm.getString(
+"applicationPushBuilder.noCoyoteRequest", 
current.getClass().getName()));
+}
+}
+
+
+@Override
+public PushBuilder setPath(String path) {
+if (path.startsWith("/")) {
+this.path = path;
+} else {
+String contextPath = baseRequest.getContextPath();

svn commit: r1708650 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/catalina/Role.java java/org/apache/catalina/Server.java java/org/apache/catalina/Service.java

2015-10-14 Thread fschumacher
Author: fschumacher
Date: Wed Oct 14 16:50:54 2015
New Revision: 1708650

URL: http://svn.apache.org/viewvc?rev=1708650=rev
Log:
javadoc: Use real @return tags instead of textual
description, only. Add missing @param tags.

Merge r1708649 from /tomcat/trunk

Modified:
tomcat/tc8.0.x/trunk/   (props changed)
tomcat/tc8.0.x/trunk/java/org/apache/catalina/Role.java
tomcat/tc8.0.x/trunk/java/org/apache/catalina/Server.java
tomcat/tc8.0.x/trunk/java/org/apache/catalina/Service.java

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Oct 14 16:50:54 2015
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
 
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1649973,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655351,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657
 
609,1657682,1657907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1666387,1666494,1666496,1666552,1666569,1666579,1
 
37,149,1666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681697,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-1684527,1684549-1684550,1685556,1685591,1685739,1685744,168577
 

svn commit: r1708645 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/catalina/Loader.java java/org/apache/catalina/Pipeline.java java/org/apache/catalina/Realm.java

2015-10-14 Thread fschumacher
Author: fschumacher
Date: Wed Oct 14 16:22:00 2015
New Revision: 1708645

URL: http://svn.apache.org/viewvc?rev=1708645=rev
Log:
javadoc: Use real @return tags instead of textual
description, only.

Merge r1708504 from /tomcat/trunk

Modified:
tomcat/tc8.0.x/trunk/   (props changed)
tomcat/tc8.0.x/trunk/java/org/apache/catalina/Loader.java
tomcat/tc8.0.x/trunk/java/org/apache/catalina/Pipeline.java
tomcat/tc8.0.x/trunk/java/org/apache/catalina/Realm.java

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Oct 14 16:22:00 2015
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
 
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1649973,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655351,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657
 
609,1657682,1657907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1666387,1666494,1666496,1666552,1666569,1666579,1
 
37,149,1666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681697,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-1684527,1684549-1684550,1685556,1685591,1685739,1685744,168577
 

CSRF prevention filter for REST

2015-10-14 Thread Violeta Georgieva
Hi,

I would like to provide such a filter as part of the default Tomcat filters
[1].
My plan is to extract the common functionality from the current
CsrfPreventionFIlter in a base class and then to use this functionality in
both CsrfPreventionFilter and the new filter which will be for REST.
I will provide the functionality in trunk so that you will be able to
review it and give me a feedback.

Regards,
Violeta

[1] http://marc.info/?t=13482586931=1=2


svn commit: r1708649 - in /tomcat/trunk/java/org/apache/catalina: Role.java Server.java Service.java

2015-10-14 Thread fschumacher
Author: fschumacher
Date: Wed Oct 14 16:49:29 2015
New Revision: 1708649

URL: http://svn.apache.org/viewvc?rev=1708649=rev
Log:
javadoc: Use real @return tags instead of textual
description, only. Add missing @param tags.

Modified:
tomcat/trunk/java/org/apache/catalina/Role.java
tomcat/trunk/java/org/apache/catalina/Server.java
tomcat/trunk/java/org/apache/catalina/Service.java

Modified: tomcat/trunk/java/org/apache/catalina/Role.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Role.java?rev=1708649=1708648=1708649=diff
==
--- tomcat/trunk/java/org/apache/catalina/Role.java (original)
+++ tomcat/trunk/java/org/apache/catalina/Role.java Wed Oct 14 16:49:29 2015
@@ -36,7 +36,7 @@ public interface Role extends Principal
 
 
 /**
- * Return the description of this role.
+ * @return the description of this role.
  */
 public String getDescription();
 
@@ -50,7 +50,7 @@ public interface Role extends Principal
 
 
 /**
- * Return the role name of this role, which must be unique
+ * @return the role name of this role, which must be unique
  * within the scope of a {@link UserDatabase}.
  */
 public String getRolename();
@@ -66,7 +66,7 @@ public interface Role extends Principal
 
 
 /**
- * Return the {@link UserDatabase} within which this Role is defined.
+ * @return the {@link UserDatabase} within which this Role is defined.
  */
 public UserDatabase getUserDatabase();
 

Modified: tomcat/trunk/java/org/apache/catalina/Server.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Server.java?rev=1708649=1708648=1708649=diff
==
--- tomcat/trunk/java/org/apache/catalina/Server.java (original)
+++ tomcat/trunk/java/org/apache/catalina/Server.java Wed Oct 14 16:49:29 2015
@@ -51,7 +51,7 @@ public interface Server extends Lifecycl
 // - Properties
 
 /**
- * Return the global naming resources.
+ * @return the global naming resources.
  */
 public NamingResourcesImpl getGlobalNamingResources();
 
@@ -66,13 +66,13 @@ public interface Server extends Lifecycl
 
 
 /**
- * Return the global naming resources context.
+ * @return the global naming resources context.
  */
 public javax.naming.Context getGlobalNamingContext();
 
 
 /**
- * Return the port number we listen to for shutdown commands.
+ * @return the port number we listen to for shutdown commands.
  */
 public int getPort();
 
@@ -86,7 +86,7 @@ public interface Server extends Lifecycl
 
 
 /**
- * Return the address on which we listen to for shutdown commands.
+ * @return the address on which we listen to for shutdown commands.
  */
 public String getAddress();
 
@@ -100,7 +100,7 @@ public interface Server extends Lifecycl
 
 
 /**
- * Return the shutdown command string we are waiting for.
+ * @return the shutdown command string we are waiting for.
  */
 public String getShutdown();
 
@@ -114,7 +114,7 @@ public interface Server extends Lifecycl
 
 
 /**
- * Return the parent class loader for this component. If not set, return
+ * @return the parent class loader for this component. If not set, return
  * {@link #getCatalina()} {@link Catalina#getParentClassLoader()}. If
  * catalina has not been set, return the system class loader.
  */
@@ -130,18 +130,20 @@ public interface Server extends Lifecycl
 
 
 /**
- * Return the outer Catalina startup/shutdown component if present.
+ * @return the outer Catalina startup/shutdown component if present.
  */
 public Catalina getCatalina();
 
 /**
  * Set the outer Catalina startup/shutdown component if present.
+ *
+ * @param catalina the outer Catalina component
  */
 public void setCatalina(Catalina catalina);
 
 
 /**
- * Obtain the configured base (instance) directory. Note that home and base
+ * @return the configured base (instance) directory. Note that home and 
base
  * may be the same (and are by default). If this is not set the value
  * returned by {@link #getCatalinaHome()} will be used.
  */
@@ -150,12 +152,14 @@ public interface Server extends Lifecycl
 /**
  * Set the configured base (instance) directory. Note that home and base
  * may be the same (and are by default).
+ *
+ * @param catalinaBase the configured base directory
  */
 public void setCatalinaBase(File catalinaBase);
 
 
 /**
- * Obtain the configured home (binary) directory. Note that home and base
+ * @return the configured home (binary) directory. Note that home and base
  * may be the same (and are by default).
  */
 public File getCatalinaHome();
@@ -163,6 

svn commit: r1708646 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/catalina/Realm.java java/org/apache/catalina/realm/RealmBase.java

2015-10-14 Thread fschumacher
Author: fschumacher
Date: Wed Oct 14 16:25:04 2015
New Revision: 1708646

URL: http://svn.apache.org/viewvc?rev=1708646=rev
Log:
javadoc: Add missing parameter and describe the
parameters for the newer RFC 2617, which is used for digest authentication
and replaces RFC 2069.

Merge r1708505 and r1708570 from /tomcat/trunk

Modified:
tomcat/tc8.0.x/trunk/   (props changed)
tomcat/tc8.0.x/trunk/java/org/apache/catalina/Realm.java
tomcat/tc8.0.x/trunk/java/org/apache/catalina/realm/RealmBase.java

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Oct 14 16:25:04 2015
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
 
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1649973,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655351,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657
 
609,1657682,1657907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1666387,1666494,1666496,1666552,1666569,1666579,1
 
37,149,1666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681697,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-1684527,1684549-1684550,1685556,1685591,1685739,1685744,168577
 

1

2015-10-14 Thread 494433674





494433674

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

2015-10-14 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-nio2 has an issue affecting its community integration.
This issue affects 1 projects,
 and has been outstanding for 7 runs.
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-nio2 :  Tomcat 9.x, a web server implementing the Java 
Servlet 4.0,
...


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-nio2/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.
 -INFO- Failed with reason build failed
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-trunk/output/logs-NIO2
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-trunk/output/test-tmp-NIO2/logs
 -WARNING- No directory 
[/srv/gump/public/workspace/tomcat-trunk/output/test-tmp-NIO2/logs]



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-nio2/gump_work/build_tomcat-trunk_tomcat-trunk-test-nio2.html
Work Name: build_tomcat-trunk_tomcat-trunk-test-nio2 (Type: Build)
Work ended in a state of : Failed
Elapsed: 42 mins 55 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 
-Djunit.jar=/srv/gump/public/workspace/junit/target/junit-4.13-SNAPSHOT.jar 
-Dobjenesis.jar=/srv/gump/public/workspace/objenesis/main/target/objenesis-2.3-SNAPSHOT.jar
 -Dtest.reports=output/logs-NIO2 
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20151014-native-src.tar.gz
 -Dexamples.sources.skip=true 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/R-4.5-201506032000/ecj-4.5.jar 
-Dtest.relaxTiming=true 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20151014.jar
 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20151014-native-src.tar.gz
 -Dtest.temp=output/test-tmp-NIO2 -Dtest.accesslog=true 
-Dexecute.test.nio=false -Dtest.openssl.path=/srv/gump/public/workspace/openssl
 -master/dest-20151014/bin/openssl -Dexecute.test.apr=false 
-Dtest.excludePerformance=true -Dexecute.test.nio2=true 
-Deasymock.jar=/srv/gump/public/workspace/easymock/core/target/easymock-3.5-SNAPSHOT.jar
 -Dhamcrest.jar=/srv/gump/packages/hamcrest/hamcrest-core-1.3.jar 
-Dcglib.jar=/srv/gump/packages/cglib/cglib-nodep-2.2.jar test 
[Working Directory: /srv/gump/public/workspace/tomcat-trunk]
CLASSPATH: 
/usr/lib/jvm/java-8-oracle/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-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/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.ja
 
r:/srv/gump/public/workspace/tomcat-trunk/output/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/websocket-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jaspic-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/catalina-storeconfig.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

Re: svn commit: r1708505 - in /tomcat/trunk/java/org/apache/catalina: Realm.java realm/RealmBase.java

2015-10-14 Thread Mark Thomas
On 13/10/2015 21:22, Felix Schumacher wrote:
> Am 13.10.2015 um 22:17 schrieb fschumac...@apache.org:
>> Author: fschumacher
>> Date: Tue Oct 13 20:17:50 2015
>> New Revision: 1708505
>>
>> URL: http://svn.apache.org/viewvc?rev=1708505=rev
>> Log:
>> javadoc: Add missing parameter and describe the
>> parameters for the newer RFC 2617, which is used for digest
>> authentication
>> and replaces RFC 2069.
>>
>> Modified:
>>  tomcat/trunk/java/org/apache/catalina/Realm.java
>>  tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java
> ...
>> Modified: tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java
>> URL:
>> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java?rev=1708505=1708504=1708505=diff
>>
>> ==
>>
>> --- tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java (original)
>> +++ tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java Tue Oct
>> 13 20:17:50 2015
>> @@ -329,19 +329,23 @@ public abstract class RealmBase extends
>>   return getPrincipal(username);
>>   }
>>   -
>>   /**
>> - * Return the Principal associated with the specified username,
>> which
>> + * Try to authenticate with the specified username, which
>>* matches the digest calculated using the given parameters
>> using the
>> - * method described in RFC 2069; otherwise return null.
>> + * method described in RFC 2617 (which is a superset of RFC 2069).
>>*
>>* @param username Username of the Principal to look up
>> - * @param clientDigest Digest which has been submitted by the client
>> + * @param digest Digest which has been submitted by the client
>>* @param nonce Unique (or supposedly unique) token which has
>> been used
>>* for this request
>> + * @param nc the nonce counter
>> + * @param cnonce the client chosen nonce
>> + * @param qop the "quality of protection" (nc and
>> cnonce
>> + *will only be used, if qop is not
>> null).
>>* @param realm Realm name
>>* @param md5a2 Second MD5 digest used to calculate the digest :
>>* MD5(Method + ":" + uri)
>> + * @return the associated principal, or null if
>> there is none.
>>*/
>>   @Override
>>   public Principal authenticate(String username, String clientDigest,
> The javadoc on the methods in RealmBase that override the Realm methods
> is just duplication.
> 
> Should we really keep them? They would have to be corrected to the same
> extend as the ones in Realm and javadoc is intelligent enough to show
> the javadoc of the overriden method.

I'd remove the duplication from RealmBase. As you say, it really isn't
necessary.

Mark


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



[Bug 58497] New: Unable to have a custom implementation of AbstractHttp11Processor due to package private methods

2015-10-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58497

Bug ID: 58497
   Summary: Unable to have a custom implementation of
AbstractHttp11Processor due to package private methods
   Product: Tomcat 7
   Version: 7.0.54
  Hardware: All
OS: All
Status: NEW
  Severity: critical
  Priority: P2
 Component: Connectors
  Assignee: dev@tomcat.apache.org
  Reporter: amit_pa...@symantec.com

http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tomcat/tomcat-coyote/7.0.54/org/apache/coyote/http11/AbstractHttp11Processor.java#AbstractHttp11Processor

Class org.apache.coyote.http11.AbstractHttp11Processor is marked as a "public
abstract" class. However:

 abstract boolean  [More ...] prepareSendfile(OutputFilter[] outputFilters);

The above method "prepareSendfile" is not marked as public ( i.e. made a
package private) and thus cannot be overridden from an extending class which is
outside of the "org.apache.coyote.http11" package.

Same can be said for :   "abstract void  actionInternal(ActionCode actionCode,
Object param)" method as well.

We have a requirement of having a custom implementation for
AbstractHttp11Processor but now we cannot because these methods cannot be
overridden unless we modify in the tomcat source code. Thus this is proving a
blocker for us.

Is there any specific reason these were made "package private" because the
class itself is abstract & public ? 

Am not too sure but this might be applicable to latest tomcat (e.g.8 ) versions
too.

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



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

2015-10-14 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-apr has an issue affecting its community integration.
This issue affects 1 projects,
 and has been outstanding for 17 runs.
The current state of this project is 'Failed', with reason 'Build Timed Out'.
For reference only, the following projects are affected by this:
- tomcat-trunk-test-apr :  Tomcat 9.x, a web server implementing the Java 
Servlet 4.0,
...


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-apr/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.
 -INFO- Failed with reason build timed out
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-trunk/output/logs-APR
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-trunk/output/test-tmp-APR/logs
 -WARNING- No directory 
[/srv/gump/public/workspace/tomcat-trunk/output/test-tmp-APR/logs]



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-apr/gump_work/build_tomcat-trunk_tomcat-trunk-test-apr.html
Work Name: build_tomcat-trunk_tomcat-trunk-test-apr (Type: Build)
Work ended in a state of : Failed
Elapsed: 1 hour 10 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 
-Djunit.jar=/srv/gump/public/workspace/junit/target/junit-4.13-SNAPSHOT.jar 
-Dobjenesis.jar=/srv/gump/public/workspace/objenesis/main/target/objenesis-2.3-SNAPSHOT.jar
 -Dtest.reports=output/logs-APR 
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20151014-native-src.tar.gz
 -Dexamples.sources.skip=true 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/R-4.5-201506032000/ecj-4.5.jar 
-Dtest.apr.loc=/srv/gump/public/workspace/tomcat-native-trunk/dest-20151014/lib 
-Dtest.relaxTiming=true 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20151014.jar
 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20151014-native-src.tar.gz
 -Dtest.temp=output/test-tmp-APR -Dtest.accesslog=true -
 Dexecute.test.nio=false 
-Dtest.openssl.path=/srv/gump/public/workspace/openssl-master/dest-20151014/bin/openssl
 -Dexecute.test.apr=true -Dtest.excludePerformance=true 
-Dexecute.test.nio2=false 
-Deasymock.jar=/srv/gump/public/workspace/easymock/core/target/easymock-3.5-SNAPSHOT.jar
 -Dhamcrest.jar=/srv/gump/packages/hamcrest/hamcrest-core-1.3.jar 
-Dcglib.jar=/srv/gump/packages/cglib/cglib-nodep-2.2.jar test 
[Working Directory: /srv/gump/public/workspace/tomcat-trunk]
CLASSPATH: 
/usr/lib/jvm/java-8-oracle/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-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/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.ja
 
r:/srv/gump/public/workspace/tomcat-trunk/output/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/websocket-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jaspic-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/catalina-storeconfig.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

svn commit: r1708570 - /tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java

2015-10-14 Thread markt
Author: markt
Date: Wed Oct 14 09:34:28 2015
New Revision: 1708570

URL: http://svn.apache.org/viewvc?rev=1708570=rev
Log:
Fix IDE nag

Modified:
tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java

Modified: tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java?rev=1708570=1708569=1708570=diff
==
--- tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java (original)
+++ tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java Wed Oct 14 
09:34:28 2015
@@ -335,7 +335,7 @@ public abstract class RealmBase extends
  * method described in RFC 2617 (which is a superset of RFC 2069).
  *
  * @param username Username of the Principal to look up
- * @param digest Digest which has been submitted by the client
+ * @param clientDigest Digest which has been submitted by the client
  * @param nonce Unique (or supposedly unique) token which has been used
  * for this request
  * @param nc the nonce counter



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



svn commit: r1708572 - in /tomcat/trunk/java/org/apache/coyote/http2: Http2UpgradeHandler.java Stream.java StreamProcessor.java

2015-10-14 Thread markt
Author: markt
Date: Wed Oct 14 09:53:32 2015
New Revision: 1708572

URL: http://svn.apache.org/viewvc?rev=1708572=rev
Log:
I/O errors during application initiated read/writes need to be handled at the 
point they occur since the application may swallow them.
I/O exceptions reported by the application may not related to the connection 
and should not be treated as fatal to it.

Modified:
tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java
tomcat/trunk/java/org/apache/coyote/http2/Stream.java
tomcat/trunk/java/org/apache/coyote/http2/StreamProcessor.java

Modified: tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java?rev=1708572=1708571=1708572=diff
==
--- tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java Wed Oct 
14 09:53:32 2015
@@ -396,7 +396,6 @@ public class Http2UpgradeHandler extends
 socketWrapper.write(true, fixedPayload, 0, 8);
 socketWrapper.flush(true);
 }
-
 }
 }
 }
@@ -491,9 +490,13 @@ public class Http2UpgradeHandler extends
 log.debug(target.limit() + " bytes");
 }
 ByteUtil.set31Bits(header, 5, 
stream.getIdentifier().intValue());
-socketWrapper.write(true, header, 0, header.length);
-socketWrapper.write(true, target.array(), 
target.arrayOffset(), target.limit());
-socketWrapper.flush(true);
+try {
+socketWrapper.write(true, header, 0, header.length);
+socketWrapper.write(true, target.array(), 
target.arrayOffset(), target.limit());
+socketWrapper.flush(true);
+} catch (IOException ioe) {
+handleAppInitiatedIOException(ioe);
+}
 }
 }
 }
@@ -524,15 +527,40 @@ public class Http2UpgradeHandler extends
 }
 }
 ByteUtil.set31Bits(header, 5, stream.getIdentifier().intValue());
-socketWrapper.write(true, header, 0, header.length);
-socketWrapper.write(true, data.array(), data.arrayOffset() + 
data.position(),
-len);
-socketWrapper.flush(true);
+try {
+socketWrapper.write(true, header, 0, header.length);
+socketWrapper.write(true, data.array(), data.arrayOffset() + 
data.position(),
+len);
+socketWrapper.flush(true);
+} catch (IOException ioe) {
+handleAppInitiatedIOException(ioe);
+}
 }
 }
 
 
-void writeWindowUpdate(Stream stream, int increment) throws IOException {
+/*
+ * Handles an I/O error on the socket underlying the HTTP/2 connection when
+ * it is triggered by application code (usually reading the request or
+ * writing the response). Such I/O errors are fatal so the connection is
+ * closed. The exception is re-thrown to make the client code aware of the
+ * problem.
+ *
+ * Note: We can not rely on this exception reaching the socket processor
+ *   since the application code may swallow it.
+ */
+private void handleAppInitiatedIOException(IOException ioe) throws 
IOException {
+close();
+throw ioe;
+}
+
+
+/*
+ * Needs to know if this was application initiated since that affects the
+ * error handling.
+ */
+void writeWindowUpdate(Stream stream, int increment, boolean 
applicationInitiated)
+throws IOException {
 synchronized (socketWrapper) {
 // Build window update frame for stream 0
 byte[] frame = new byte[13];
@@ -542,8 +570,16 @@ public class Http2UpgradeHandler extends
 socketWrapper.write(true, frame, 0, frame.length);
 // Change stream Id and re-use
 ByteUtil.set31Bits(frame, 5, stream.getIdentifier().intValue());
-socketWrapper.write(true, frame, 0, frame.length);
-socketWrapper.flush(true);
+try {
+socketWrapper.write(true, frame, 0, frame.length);
+socketWrapper.flush(true);
+} catch (IOException ioe) {
+if (applicationInitiated) {
+handleAppInitiatedIOException(ioe);
+} else {
+throw ioe;
+}
+}
 }
 }
 
@@ -997,7 +1033,7 @@ public class Http2UpgradeHandler extends
 ConnectionException, IOException {
 Stream stream = getStream(streamId, true);
 // +1 is for the payload byte used to define the padding length
-

svn commit: r1708687 - in /tomcat/trunk/modules/jdbc-pool/src: main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java test/java/org/apache/tomcat/jdbc/test/TestSlowQueryComparator.java

2015-10-14 Thread fschumacher
Author: fschumacher
Date: Wed Oct 14 20:28:55 2015
New Revision: 1708687

URL: http://svn.apache.org/viewvc?rev=1708687=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58489

Comparator should follow the rules. If first object has lastInvocation of zero,
we should compare it to the second objects lastInvocation and vice versa.
When we do that, we can use Long#compare just as well.

Added:

tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestSlowQueryComparator.java
Modified:

tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java

Modified: 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java?rev=1708687=1708686=1708687=diff
==
--- 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java
 (original)
+++ 
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/SlowQueryReport.java
 Wed Oct 14 20:28:55 2015
@@ -475,17 +475,7 @@ public class SlowQueryReport extends Abs
 
 @Override
 public int compare(QueryStats stats1, QueryStats stats2) {
-if (stats1.lastInvocation == 0) return 1;
-if (stats2.lastInvocation == 0) return -1;
-
-long result = stats1.lastInvocation - stats2.lastInvocation;
-if (result > 0) {
-return 1;
-} else if (result == 0) {
-return 0;
-} else {
-return -1;
-}
+return Long.compare(stats1.lastInvocation, stats2.lastInvocation);
 }
 }
 

Added: 
tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestSlowQueryComparator.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestSlowQueryComparator.java?rev=1708687=auto
==
--- 
tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestSlowQueryComparator.java
 (added)
+++ 
tomcat/trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestSlowQueryComparator.java
 Wed Oct 14 20:28:55 2015
@@ -0,0 +1,121 @@
+package org.apache.tomcat.jdbc.test;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+import org.apache.tomcat.jdbc.pool.interceptor.SlowQueryReport.QueryStats;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class TestSlowQueryComparator {
+
+@Test
+public void testBug58489() throws ClassNotFoundException,
+InstantiationException, IllegalAccessException,
+InvocationTargetException {
+
+long[] testData = { 0, 0, 0, 1444225382010l, 0, 1444225382011l, 0,
+1444225382012l, 0, 1444225382056l, 0, 1444225382014l, 0,
+1444225382015l, 0, 1444225382016l, 0, 0, 1444225382017l, 0,
+1444225678350l, 0, 1444225680397l, 0, 1444225382018l,
+1444225382019l, 1444225382020l, 0, 1444225382021l, 0,
+1444225382022l, 1444225382023l
+
+};
+
+List stats = new ArrayList<>();
+
+for (int i = 0; i < testData.length; i++) {
+QueryStats qs = new QueryStats(String.valueOf(i));
+qs.add(0, testData[i]);
+stats.add(qs);
+}
+
+try {
+Collections.sort(stats, createComparator());
+} catch (IllegalArgumentException e) {
+Assert.fail(e.getMessage());
+}
+}
+
+@Test
+public void testEqualQueryStatsWithNoLastInvocation()
+throws ClassNotFoundException, InstantiationException,
+IllegalAccessException, IllegalArgumentException,
+InvocationTargetException {
+Comparator queryStatsComparator = createComparator();
+QueryStats q1 = new QueryStats("abc");
+Assert.assertEquals(0, queryStatsComparator.compare(q1, q1));
+}
+
+@Test
+public void testEqualQueryStatsWithLastInvocation()
+throws ClassNotFoundException, InstantiationException,
+IllegalAccessException, IllegalArgumentException,
+InvocationTargetException {
+Comparator queryStatsComparator = createComparator();
+QueryStats q1 = new QueryStats("abc");
+q1.add(0, 100);
+Assert.assertEquals(0, queryStatsComparator.compare(q1, q1));
+}
+
+@Test
+public void testQueryStatsOneWithLastInvocation()
+throws ClassNotFoundException, InstantiationException,
+

[Tomcat Wiki] Update of "tools/SSLTest.java" by ChristopherSchultz

2015-10-14 Thread Apache Wiki
Dear Wiki user,

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

The "tools/SSLTest.java" page has been changed by ChristopherSchultz:
https://wiki.apache.org/tomcat/tools/SSLTest.java?action=diff=2=3

Comment:
Added change to enable all algorithms

  
  /**
   * A driver class to test a server's SSL/TLS support.
-  * 
+  *
   * Usage: java SSLTest [opts] host[:port]
-  * 
+  *
   * Try "java SSLTest -h" for help.
-  * 
+  *
   * This tester will attempts to handshake with the target host with all
   * available protocols and ciphers and report which ones were accepted and
   * which were rejected. An HTTP connection is never fully made, so these
   * connections should not flood the host's access log with entries.
-  * 
+  *
   * @author Christopher Schultz
   */
  public class SSLTest
@@ -148, +148 @@

  System.exit(1);
  }
  }
- 
+ 
  if(argIndex >= args.length)
  {
  System.err.println("Unexpected additional arguments: "
@@ -172, +172 @@

  if(null == trustStoreType)
  trustStoreType = "JKS";
  
- trustManagers = SSLUtils.getTrustManagers(trustStoreFilename, 
trustStorePassword, trustStoreType, trustStoreProvider, trustStoreAlgorithm, 
null, crlFilename);
+ trustManagers = SSLUtils.getTrustManagers(trustStoreFilename, 
trustStorePassword, trustStoreType, trustStoreProvider, trustStoreAlgorithm, 
null, crlFilename);
  }
  else
  trustManagers = null;
@@ -186, +186 @@

  port = Integer.parseInt(host.substring(pos + 1));
  host = host.substring(0, pos);
  }
- 
+ 
  System.out.println("Testing server " + host + ":" + port);
+ 
+ // Enable *all* algorithms
+ Security.setProperty("jdk.tls.disabledAlgorithms", "");
  
  SecureRandom rand = new SecureRandom();
  
@@ -335, +338 @@

  System.out.print(socket.getSession().getProtocol());
  System.out.print(", cipher=");
  System.out.println(socket.getSession().getCipherSuite());
- 
+ 
  if(showCerts)
  {
  for(Certificate cert : 
socket.getSession().getPeerCertificates())
@@ -368, +371 @@

  static String toHexString(byte[] bytes)
  {
  StringBuilder sb = new StringBuilder(bytes.length * 2);
- 
+ 
  for(byte b : bytes)
  sb.append(hexChars[(b >> 4) & 0x0f])
.append(hexChars[b & 0x0f]);
- 
+ 
  return sb.toString();
  }
  }

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



[Tomcat Wiki] Update of "tools/SSLTest.java" by ChristopherSchultz

2015-10-14 Thread Apache Wiki
Dear Wiki user,

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

The "tools/SSLTest.java" page has been changed by ChristopherSchultz:
https://wiki.apache.org/tomcat/tools/SSLTest.java?action=diff=3=4

Comment:
Added auto-detection of protocols if none are specified

  import java.net.Socket;
  import java.net.SocketTimeoutException;
  import java.security.NoSuchAlgorithmException;
+ import java.security.Provider;
  import java.security.SecureRandom;
+ import java.security.Security;
  import java.security.cert.Certificate;
  import java.security.cert.X509Certificate;
  import java.util.ArrayList;
  import java.util.Arrays;
+ import java.util.Collections;
  import java.util.HashSet;
+ import java.util.List;
+ import java.util.Map.Entry;
  
  import javax.net.ssl.SSLContext;
  import javax.net.ssl.SSLSocket;
@@ -187, +192 @@

  host = host.substring(0, pos);
  }
  
+ // Enable all algorithms
+ Security.setProperty("jdk.tls.disabledAlgorithms", "");
+ 
+ List supportedProtocols;
+ 
+ if(null == sslEnabledProtocols)
+ {
+ // Auto-detect protocols
+ ArrayList protocols = new ArrayList();
+ // TODO: Allow the specification of a specific provider (or set?)
+ for(Provider provider : Security.getProviders())
+ {
+ for(Object prop : provider.keySet())
+ {
+ String key = (String)prop;
+ if(key.startsWith("SSLContext.")
+&& !key.equals("SSLContext.Default")
+&& key.matches(".*[0-9].*"))
+ protocols.add(key.substring("SSLContext.".length()));
+ else if(key.startsWith("Alg.Alias.SSLContext.")
+ && key.matches(".*[0-9].*"))
+ 
protocols.add(key.substring("Alg.Alias.SSLContext.".length()));
+ }
+ }
+ Collections.sort(protocols); // Should give us a nice sort-order 
by default
+ System.err.println("Auto-detected client-supported protocols: " + 
protocols);
+ supportedProtocols = protocols;
+ sslEnabledProtocols = supportedProtocols.toArray(new 
String[supportedProtocols.size()]);
+ }
+ else
+ {
+ supportedProtocols = new 
ArrayList(Arrays.asList(sslEnabledProtocols));
+ }
+ 
  System.out.println("Testing server " + host + ":" + port);
- 
- // Enable *all* algorithms
- Security.setProperty("jdk.tls.disabledAlgorithms", "");
  
  SecureRandom rand = new SecureRandom();
  
@@ -198, +234 @@

  System.out.print(String.format(reportFormat, "Supported", "Protocol", 
"Cipher"));
  
  InetSocketAddress address = new InetSocketAddress(host, port);
- 
- ArrayList supportedProtocols = new 
ArrayList(Arrays.asList(sslEnabledProtocols));
  
  for(String protocol : sslEnabledProtocols)
  {

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



svn commit: r1708698 - in /tomcat/trunk/java: javax/servlet/http/PushBuilder.java org/apache/catalina/core/ApplicationPushBuilder.java

2015-10-14 Thread markt
Author: markt
Date: Wed Oct 14 21:38:29 2015
New Revision: 1708698

URL: http://svn.apache.org/viewvc?rev=1708698=rev
Log:
Servlet 4.0
Add the header reading methods to PushBuilder and implement them
Note the headers are currently unused.

Modified:
tomcat/trunk/java/javax/servlet/http/PushBuilder.java
tomcat/trunk/java/org/apache/catalina/core/ApplicationPushBuilder.java

Modified: tomcat/trunk/java/javax/servlet/http/PushBuilder.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/http/PushBuilder.java?rev=1708698=1708697=1708698=diff
==
--- tomcat/trunk/java/javax/servlet/http/PushBuilder.java (original)
+++ tomcat/trunk/java/javax/servlet/http/PushBuilder.java Wed Oct 14 21:38:29 
2015
@@ -16,6 +16,8 @@
 */
 package javax.servlet.http;
 
+import java.util.Set;
+
 /**
  * Builds a push request based on the {@link HttpServletRequest} from which 
this
  * builder was obtained. The push request will be constructed on the following
@@ -89,4 +91,22 @@ public interface PushBuilder {
  * @return This builder instance
  */
 PushBuilder removeHeader(String name);
+
+/**
+ * @return The current set of names of HTTP headers to be used the next 
time
+ * {@code push()} is called.
+ */
+Set getHeaderNames();
+
+/**
+ * Obtain a value for the given HTTP header.
+ * TODO Servlet 4.0
+ * Clarify the behaviour of this method
+ *
+ * @param name  The name of the header whose value is to be returned
+ *
+ * @return The value of the given header. If multiple values are defined
+ * then any may be returned
+ */
+String getHeader(String name);
 }

Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationPushBuilder.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationPushBuilder.java?rev=1708698=1708697=1708698=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/ApplicationPushBuilder.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/ApplicationPushBuilder.java Wed 
Oct 14 21:38:29 2015
@@ -17,10 +17,12 @@
 package org.apache.catalina.core;
 
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 import javax.servlet.ServletRequest;
 import javax.servlet.ServletRequestWrapper;
@@ -125,6 +127,23 @@ public class ApplicationPushBuilder impl
 
 
 @Override
+public Set getHeaderNames() {
+return Collections.unmodifiableSet(headers.keySet());
+}
+
+
+@Override
+public String getHeader(String name) {
+List values = headers.get(name);
+if (values == null) {
+return null;
+} else {
+return values.get(0);
+}
+}
+
+
+@Override
 public void push() {
 if (path == null) {
 throw new 
IllegalStateException(sm.getString("pushBuilder.noPath"));
@@ -141,6 +160,8 @@ public class ApplicationPushBuilder impl
 pushTarget.requestURI().setString(path);
 pushTarget.decodedURI().setString(path);
 
+// TODO Copy headers
+// TODO Implement other required attributes
 // TODO Copy across / set other required attributes
 
 coyoteRequest.action(ActionCode.PUSH_REQUEST, pushTarget);



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



svn commit: r1708694 - in /tomcat/trunk/java: javax/servlet/http/PushBuilder.java org/apache/catalina/core/ApplicationPushBuilder.java org/apache/catalina/core/LocalStrings.properties

2015-10-14 Thread markt
Author: markt
Date: Wed Oct 14 21:21:26 2015
New Revision: 1708694

URL: http://svn.apache.org/viewvc?rev=1708694=rev
Log:
Servlet 4.0
Add Javadoc to PushBuilder.push()
Add the header manipulation methods to the PushBuilder interface

Modified:
tomcat/trunk/java/javax/servlet/http/PushBuilder.java
tomcat/trunk/java/org/apache/catalina/core/ApplicationPushBuilder.java
tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties

Modified: tomcat/trunk/java/javax/servlet/http/PushBuilder.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/http/PushBuilder.java?rev=1708694=1708693=1708694=diff
==
--- tomcat/trunk/java/javax/servlet/http/PushBuilder.java (original)
+++ tomcat/trunk/java/javax/servlet/http/PushBuilder.java Wed Oct 14 21:21:26 
2015
@@ -45,5 +45,48 @@ public interface PushBuilder {
  */
 PushBuilder setPath(String path);
 
+/**
+ * Generates the push request. After calling this method the following
+ * fields are set to {@code null}:
+ * 
+ * {@code path}
+ * {@code etag}
+ * {@code lastModified}
+ * 
+ *
+ * @throws IllegalStateException If this method is called when {@code path}
+ * is {@code null}
+ * @throws IllegalArgumentException If the request to push requires a body
+ */
 void push();
+
+/**
+ * Adds a HTTP header to the request.
+ *
+ * @param name  The name of the header to add
+ * @param value The value of the header to add
+ *
+ * @return This builder instance
+ */
+PushBuilder addHeader(String name, String value);
+
+/**
+ * Sets a HTTP header on the request. Any existing headers of the same name
+ * are first remove.
+ *
+ * @param name  The name of the header to set
+ * @param value The value of the header to set
+ *
+ * @return This builder instance
+ */
+PushBuilder setHeader(String name, String value);
+
+/**
+ * Removes an HTTP header from the request.
+ *
+ * @param name  The name of the header to remove
+ *
+ * @return This builder instance
+ */
+PushBuilder removeHeader(String name);
 }

Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationPushBuilder.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationPushBuilder.java?rev=1708694=1708693=1708694=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/ApplicationPushBuilder.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/ApplicationPushBuilder.java Wed 
Oct 14 21:21:26 2015
@@ -16,6 +16,12 @@
  */
 package org.apache.catalina.core;
 
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 import javax.servlet.ServletRequest;
 import javax.servlet.ServletRequestWrapper;
 import javax.servlet.http.HttpServletRequest;
@@ -33,6 +39,7 @@ public class ApplicationPushBuilder impl
 private final org.apache.coyote.Request coyoteRequest;
 
 private String path;
+private Map headers = new HashMap<>();
 
 public ApplicationPushBuilder(HttpServletRequest request) {
 baseRequest = request;
@@ -47,6 +54,20 @@ public class ApplicationPushBuilder impl
 throw new UnsupportedOperationException(sm.getString(
 "applicationPushBuilder.noCoyoteRequest", 
current.getClass().getName()));
 }
+
+// Populate the initial list of HTTP headers
+// TODO Servlet 4.0
+//  Filter headers as required by Servlet spec
+Enumeration headerNames = request.getHeaderNames();
+while (headerNames.hasMoreElements()) {
+String headerName = headerNames.nextElement();
+List values = new ArrayList<>();
+headers.put(headerName, values);
+Enumeration headerValues = request.getHeaders(headerName);
+while (headerValues.hasMoreElements()) {
+values.add(headerValues.nextElement());
+}
+}
 }
 
 
@@ -68,7 +89,47 @@ public class ApplicationPushBuilder impl
 
 
 @Override
+public PushBuilder addHeader(String name, String value) {
+List values = headers.get(name);
+if (values == null) {
+values = new ArrayList<>();
+headers.put(name, values);
+}
+values.add(value);
+
+return this;
+}
+
+
+@Override
+public PushBuilder setHeader(String name, String value) {
+List values = headers.get(name);
+if (values == null) {
+values = new ArrayList<>();
+headers.put(name, values);
+} else {
+values.clear();
+}
+values.add(value);
+
+return this;
+}
+
+
+@Override
+public PushBuilder 

svn commit: r1708695 - /tomcat/trunk/conf/logging.properties

2015-10-14 Thread markt
Author: markt
Date: Wed Oct 14 21:23:24 2015
New Revision: 1708695

URL: http://svn.apache.org/viewvc?rev=1708695=rev
Log:
Replace the enabled selective HTTP/2 debugging for Gump with commented out 
generic HTTP/2 debugging so alpha users can easily enable useful logging

Modified:
tomcat/trunk/conf/logging.properties

Modified: tomcat/trunk/conf/logging.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/conf/logging.properties?rev=1708695=1708694=1708695=diff
==
--- tomcat/trunk/conf/logging.properties (original)
+++ tomcat/trunk/conf/logging.properties Wed Oct 14 21:23:24 2015
@@ -63,5 +63,5 @@ org.apache.catalina.core.ContainerBase.[
 # To see debug messages in TldLocationsCache, uncomment the following line:
 #org.apache.jasper.compiler.TldLocationsCache.level = FINE
 
-# Temporary addition to generate debug logging to investigate Gump failures
-org.apache.coyote.http2.Http2UpgradeHandler.level = FINE
+# To see debug messages for HTTP/2 handling, uncomment the following line:
+#org.apache.coyote.http2.level = FINE



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

2015-10-14 Thread Keith Wannamaker
>
> The proposed Apache Tomcat 7.0.65 release is now available for voting.
> It can be obtained from:
> https://dist.apache.org/repos/dist/dev/tomcat/tomcat-7/v7.0.65/
> The Maven staging repo is:
> https://repository.apache.org/content/repositories/orgapachetomcat-1053/
> The svn tag is:
> http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_65/
> The proposed 7.0.65 release is:
> [ ] Broken - do not release
> [X] Stable - go ahead and release as 7.0.65 Stable


CentOS 7


> Regards,
> Violeta


svn commit: r1708580 - in /tomcat/trunk/java/org/apache/coyote/http2: Http2UpgradeHandler.java Stream.java StreamStateMachine.java

2015-10-14 Thread markt
Author: markt
Date: Wed Oct 14 10:42:44 2015
New Revision: 1708580

URL: http://svn.apache.org/viewvc?rev=1708580=rev
Log:
Partially revert previous error handling changes. Generally, the reset always 
needs to be sent (even if the state doesn't change).

Modified:
tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java
tomcat/trunk/java/org/apache/coyote/http2/Stream.java
tomcat/trunk/java/org/apache/coyote/http2/StreamStateMachine.java

Modified: tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java?rev=1708580=1708579=1708580=diff
==
--- tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java Wed Oct 
14 10:42:44 2015
@@ -401,35 +401,28 @@ public class Http2UpgradeHandler extends
 }
 
 
-void resetStream(StreamException se) throws ConnectionException, 
IOException {
+void resetStream(StreamException se) throws IOException {
 
 if (log.isDebugEnabled()) {
 log.debug(sm.getString("upgradeHandler.rst.debug", connectionId,
 Integer.toString(se.getStreamId()), se.getError()));
 }
 
-// If the stream is null, the server knows nothing about it. The ID can
-// only have come from the client so always send a reset.
-// If the stream is not null, the server does know about the stream so
-// only send the reset if the stream is in an appropriate state.
-Stream stream = getStream(se.getStreamId(), false);
-if (stream == null || stream.sendReset()) {
-// Write a RST frame
-byte[] rstFrame = new byte[13];
-// Length
-ByteUtil.setThreeBytes(rstFrame, 0, 4);
-// Type
-rstFrame[3] = FrameType.RST.getIdByte();
-// No flags
-// Stream ID
-ByteUtil.set31Bits(rstFrame, 5, se.getStreamId());
-// Payload
-ByteUtil.setFourBytes(rstFrame, 9, se.getError().getCode());
-
-synchronized (socketWrapper) {
-socketWrapper.write(true, rstFrame, 0, rstFrame.length);
-socketWrapper.flush(true);
-}
+// Write a RST frame
+byte[] rstFrame = new byte[13];
+// Length
+ByteUtil.setThreeBytes(rstFrame, 0, 4);
+// Type
+rstFrame[3] = FrameType.RST.getIdByte();
+// No flags
+// Stream ID
+ByteUtil.set31Bits(rstFrame, 5, se.getStreamId());
+// Payload
+ByteUtil.setFourBytes(rstFrame, 9, se.getError().getCode());
+
+synchronized (socketWrapper) {
+socketWrapper.write(true, rstFrame, 0, rstFrame.length);
+socketWrapper.flush(true);
 }
 }
 

Modified: tomcat/trunk/java/org/apache/coyote/http2/Stream.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/Stream.java?rev=1708580=1708579=1708580=diff
==
--- tomcat/trunk/java/org/apache/coyote/http2/Stream.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http2/Stream.java Wed Oct 14 10:42:44 
2015
@@ -321,14 +321,11 @@ public class Stream extends AbstractStre
  * The stream is already reset
  * The stream is already closed
  *
- * @return true if a reset frame needs to be sent to the peer,
- * otherwise false
- *
  * @throws IllegalStateException If the stream is in a state that does not
  * permit resets
  */
-boolean sendReset() {
-return state.sendReset();
+void sendReset() {
+state.sendReset();
 }
 
 
@@ -356,8 +353,6 @@ public class Stream extends AbstractStre
 if (http2Exception instanceof StreamException) {
 try {
 handler.resetStream((StreamException) http2Exception);
-} catch (ConnectionException ce) {
-handler.closeConnection(ce);
 } catch (IOException ioe) {
 // TODO i18n
 ConnectionException ce = new ConnectionException("", 
Http2Error.PROTOCOL_ERROR);

Modified: tomcat/trunk/java/org/apache/coyote/http2/StreamStateMachine.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/StreamStateMachine.java?rev=1708580=1708579=1708580=diff
==
--- tomcat/trunk/java/org/apache/coyote/http2/StreamStateMachine.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http2/StreamStateMachine.java Wed Oct 
14 10:42:44 2015
@@ -90,22 +90,16 @@ public class StreamStateMachine {
  * The stream is already closed
  * 
  *
- * @return true if a reset frame needs to be sent to the 

[Bug 58489] QueryStatsComparator throws IllegalArgumentException: Comparison method violates its general contract!

2015-10-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58489

--- Comment #1 from Remy Tiitre  ---
SlowQueryReport.java line 478 is the reason for this crash. compare(x,x) should
not return 1.

if (stats1.lastInvocation == 0 && stats2.lastInvocation != 0) return 1;

-- 
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: r1708575 - /tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java

2015-10-14 Thread markt
Author: markt
Date: Wed Oct 14 10:12:41 2015
New Revision: 1708575

URL: http://svn.apache.org/viewvc?rev=1708575=rev
Log:
Modify behaviour for resetting streams.
Always send a reset for a stream level error on a stream that is unknown to the 
server since the client must have send the stream ID.

Modified:
tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java

Modified: tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java?rev=1708575=1708574=1708575=diff
==
--- tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java Wed Oct 
14 10:12:41 2015
@@ -408,8 +408,12 @@ public class Http2UpgradeHandler extends
 Integer.toString(se.getStreamId()), se.getError()));
 }
 
+// If the stream is null, the server knows nothing about it. The ID can
+// only have come from the client so always send a reset.
+// If the stream is not null, the server does know about the stream so
+// only send the reset if the stream is in an appropriate state.
 Stream stream = getStream(se.getStreamId(), false);
-if (stream != null && stream.sendReset()) {
+if (stream == null || stream.sendReset()) {
 // Write a RST frame
 byte[] rstFrame = new byte[13];
 // Length



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



Re: Consider support for the Servlet profile of JSR 196 (JASPIC) in Tomcat 7.0.x

2015-10-14 Thread Fjodor Versinin
Hi!
Actually, I would like to continue to work on this, but not in GSOC scope 
anymore, because that expirience was too stressful for me.
What about current JASPIC implementation, it is almost ready, so I think it 
would be better to keep already wroten code than rewriting it from a scratch. 
What about security, I'm not sure, but this code has been accepted during the 
summer time, it has not be changed since then. Security must be on the same 
level,  I hope so. However,  some places of old auth valves should be rewritten 
in more readable way.

Fjodor

 Mark Thomas wrote 

>On 14/10/2015 13:00, Arjan Tijms wrote:
>> Hi there,
>> 
>> Haven't seen updates for some time here. Wonder what the current
>> status is and what exactly happened in the last months. Last commits
>> in the Tomcat repo are from 3 months ago.
>
>The GSoC student took the money and ran at the mid-term evaluation. I
>should have gone with my first instinct which was to fail them at the
>mid-term due to lack of effort.
>
>Getting back to this is on my TODO list for Tomcat 9. I plan to remove
>the GSoC work and start again from scratch. While that might seem
>excessive I simply do not trust the refactoring that Fjodor completed is
>secure. It will be quicker to re-do the work myself than it will be to
>check the refactoring line by line.
>
>Mark
>
>
>> 
>> Kind regards,
>> Arjan Tijms
>> 
>> 
>> 
>> On Thu, Jun 11, 2015 at 10:39 AM, markt [via Tomcat]
>>  wrote:
>>> On 10/06/2015 16:43, Arjan Tijms wrote:
>>>
 Hi,

 On Wed, Jun 10, 2015 at 3:28 PM, markt [via Tomcat] <
 [hidden email]> wrote:

> I don't really understand what the requirement is here. Can you expand /
> point me to the part of the spec?
>

 It's simply that from within a SAM you can forward/include to a Servlet
 using a dispatcher, such that the output of that Servlet is inserted in
 the
 response.
>>>
>>> Thanks for the clarification. You can do that easily from a Valve in a
>>> couple of lines of code. No need for extra internal plumbing that I can see.
>>>
>>> Mark
>>>

 It's in section 3.8.3.4 of the JASPIC spec:


 "3.8.3.4
 Forwards and Includes by Server Authentication Modules

 The message processing runtime must support the acquisition and use of
 RequestDispatcher objects by authentication modules within their
 processing
 of validateRequest.

 Under the constraints defined by RequestDispatcher, authentication modules
 must be able to forward and include using the request and response objects
 passed in MessageInfo. In particular, an authentication module must be
 able
 to acquire a RequestDispatcher from the request obtained from MessageInfo,
 and uses it to forward the request (and response) to a login form.
 Authentication modules should catch and rethrow as an AuthException any
 exception thrown by these methods."


 A test/example showing this in practice is the following:


 https://github.com/javaee-samples/javaee7-samples/tree/master/jaspic/dispatching

 Specifically, this code shows both an include and a forward done by a SAM:

   public AuthStatus validateRequest(MessageInfo messageInfo, Subject
 clientSubject, Subject serviceSubject) throws AuthException {
 try {
 HttpServletRequest request = (HttpServletRequest)
 messageInfo.getRequestMessage();
 HttpServletResponse response = (HttpServletResponse)
 messageInfo.getResponseMessage();

 if ("include".equals(request.getParameter("dispatch"))) {
 request.getRequestDispatcher("/includedServlet")
.include(request, response);

 // "Do nothing", required protocol when returning SUCCESS
 handler.handle(new Callback[] { new
 CallerPrincipalCallback(clientSubject, (Principal) null) });

 // When using includes, the response stays open and the
 main
 // resource can also write to the response
 return SUCCESS;

 } else {
 request.getRequestDispatcher("/forwardedServlet")
.forward(request, response);

 // MUST NOT invoke the resource, so CAN NOT return SUCCESS
 here.
 return SEND_CONTINUE;
 }

 } catch (IOException | ServletException |
 UnsupportedCallbackException e) {
 throw (AuthException) new AuthException().initCause(e);
 }
 }


 Sounds good. Thanks for the tip.
>

 You're welcome ;)

 Kind regards,
 Arjan Tijms




>
> Cheers,
>
> mark
>
> 

buildbot success in ASF Buildbot on tomcat-trunk

2015-10-14 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/438

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



Re: Consider support for the Servlet profile of JSR 196 (JASPIC) in Tomcat 7.0.x

2015-10-14 Thread Arjan Tijms
Hi there,

Haven't seen updates for some time here. Wonder what the current
status is and what exactly happened in the last months. Last commits
in the Tomcat repo are from 3 months ago.

Kind regards,
Arjan Tijms



On Thu, Jun 11, 2015 at 10:39 AM, markt [via Tomcat]
 wrote:
> On 10/06/2015 16:43, Arjan Tijms wrote:
>
>> Hi,
>>
>> On Wed, Jun 10, 2015 at 3:28 PM, markt [via Tomcat] <
>> [hidden email]> wrote:
>>
>>> I don't really understand what the requirement is here. Can you expand /
>>> point me to the part of the spec?
>>>
>>
>> It's simply that from within a SAM you can forward/include to a Servlet
>> using a dispatcher, such that the output of that Servlet is inserted in
>> the
>> response.
>
> Thanks for the clarification. You can do that easily from a Valve in a
> couple of lines of code. No need for extra internal plumbing that I can see.
>
> Mark
>
>>
>> It's in section 3.8.3.4 of the JASPIC spec:
>>
>>
>> "3.8.3.4
>> Forwards and Includes by Server Authentication Modules
>>
>> The message processing runtime must support the acquisition and use of
>> RequestDispatcher objects by authentication modules within their
>> processing
>> of validateRequest.
>>
>> Under the constraints defined by RequestDispatcher, authentication modules
>> must be able to forward and include using the request and response objects
>> passed in MessageInfo. In particular, an authentication module must be
>> able
>> to acquire a RequestDispatcher from the request obtained from MessageInfo,
>> and uses it to forward the request (and response) to a login form.
>> Authentication modules should catch and rethrow as an AuthException any
>> exception thrown by these methods."
>>
>>
>> A test/example showing this in practice is the following:
>>
>>
>> https://github.com/javaee-samples/javaee7-samples/tree/master/jaspic/dispatching
>>
>> Specifically, this code shows both an include and a forward done by a SAM:
>>
>>   public AuthStatus validateRequest(MessageInfo messageInfo, Subject
>> clientSubject, Subject serviceSubject) throws AuthException {
>> try {
>> HttpServletRequest request = (HttpServletRequest)
>> messageInfo.getRequestMessage();
>> HttpServletResponse response = (HttpServletResponse)
>> messageInfo.getResponseMessage();
>>
>> if ("include".equals(request.getParameter("dispatch"))) {
>> request.getRequestDispatcher("/includedServlet")
>>.include(request, response);
>>
>> // "Do nothing", required protocol when returning SUCCESS
>> handler.handle(new Callback[] { new
>> CallerPrincipalCallback(clientSubject, (Principal) null) });
>>
>> // When using includes, the response stays open and the
>> main
>> // resource can also write to the response
>> return SUCCESS;
>>
>> } else {
>> request.getRequestDispatcher("/forwardedServlet")
>>.forward(request, response);
>>
>> // MUST NOT invoke the resource, so CAN NOT return SUCCESS
>> here.
>> return SEND_CONTINUE;
>> }
>>
>> } catch (IOException | ServletException |
>> UnsupportedCallbackException e) {
>> throw (AuthException) new AuthException().initCause(e);
>> }
>> }
>>
>>
>> Sounds good. Thanks for the tip.
>>>
>>
>> You're welcome ;)
>>
>> Kind regards,
>> Arjan Tijms
>>
>>
>>
>>
>>>
>>> Cheers,
>>>
>>> mark
>>>
>>> -
>>> To unsubscribe, e-mail: [hidden email]
>>> 
>>> For additional commands, e-mail: [hidden email]
>>> 
>>>
>>>
>>>
>>> --
>>>  If you reply to this email, your message will be added to the discussion
>>> below:
>>>
>>>
>>> http://tomcat.10.x6.nabble.com/Consider-support-for-the-Servlet-profile-of-JSR-196-JASPIC-in-Tomcat-7-0-x-tp4993387p5035887.html
>>>  To unsubscribe from Consider support for the Servlet profile of JSR 196
>>> (JASPIC) in Tomcat 7.0.x, click here
>>> <
>>> .
>>> NAML
>>>
>>> 
>>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://tomcat.10.x6.nabble.com/Consider-support-for-the-Servlet-profile-of-JSR-196-JASPIC-in-Tomcat-7-0-x-tp4993387p5035891.html
>> Sent from the Tomcat - Dev mailing list archive at Nabble.com.
>>
>
>
> -
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: 

[Bug 58497] Unable to have a custom implementation of AbstractHttp11Processor due to package private methods

2015-10-14 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58497

Amit Pande  changed:

   What|Removed |Added

 CC||amit_pa...@symantec.com

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



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

2015-10-14 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-test-bio 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-tc8.0.x-test-bio :  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-test-bio/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.
 -INFO- Failed with reason build failed
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-8.0.x/output/logs-BIO
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-8.0.x/output/test-tmp-BIO/logs
 -WARNING- No directory 
[/srv/gump/public/workspace/tomcat-8.0.x/output/test-tmp-BIO/logs]



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-8.0.x/tomcat-tc8.0.x-test-bio/gump_work/build_tomcat-8.0.x_tomcat-tc8.0.x-test-bio.html
Work Name: build_tomcat-8.0.x_tomcat-tc8.0.x-test-bio (Type: Build)
Work ended in a state of : Failed
Elapsed: 33 mins 38 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 
-Djunit.jar=/srv/gump/public/workspace/junit/target/junit-4.13-SNAPSHOT.jar 
-Dobjenesis.jar=/srv/gump/public/workspace/objenesis/main/target/objenesis-2.3-SNAPSHOT.jar
 -Dtest.reports=output/logs-BIO 
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20151015-native-src.tar.gz
 -Dexamples.sources.skip=true 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/R-4.5-201506032000/ecj-4.5.jar 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20151015.jar
 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20151015-native-src.tar.gz
 -Dtest.temp=output/test-tmp-BIO -Dtest.accesslog=true -Dexecute.test.nio=false 
-Dtest.openssl.path=/srv/gump/public/workspace/openssl-1.0.2/dest-20151015/bin/o
 penssl -Dexecute.test.bio=true -Dexecute.test.apr=false 
-Dtest.excludePerformance=true -Dexecute.test.nio2=false 
-Deasymock.jar=/srv/gump/public/workspace/easymock/core/target/easymock-3.5-SNAPSHOT.jar
 -Dhamcrest.jar=/srv/gump/packages/hamcrest/hamcrest-core-1.3.jar 
-Dcglib.jar=/srv/gump/packages/cglib/cglib-nodep-2.2.jar test 
[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/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-8.0.x/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-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/tomcat-8.0.x/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-8.0.x/output/build/lib/servlet-api.ja
 

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

2015-10-14 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-validate has an issue affecting its community integration.
This issue affects 1 projects,
 and has been outstanding for 4 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-trunk-validate :  Tomcat 9.x, a web server implementing the Java 
Servlet 4.0,
...


Full details are available at:

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

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on checkstyle exists, no need to add for property 
checkstyle.jar.
 -INFO- Failed with reason build failed



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-validate/gump_work/build_tomcat-trunk_tomcat-trunk-validate.html
Work Name: build_tomcat-trunk_tomcat-trunk-validate (Type: Build)
Work ended in a state of : Failed
Elapsed: 1 min 6 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 
-Dcheckstyle.jar=/srv/gump/public/workspace/checkstyle/target/checkstyle-6.12-SNAPSHOT.jar
 -Dexecute.validate=true validate 
[Working Directory: /srv/gump/public/workspace/tomcat-trunk]
CLASSPATH: 
/usr/lib/jvm/java-8-oracle/lib/tools.jar:/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/checkstyle/target/checkstyle-6.12-SNAPSHOT.jar:/srv/gump/packages/antlr/antlr-3.1.3.jar:/srv/gump/public/workspace/apache-commons/beanutils/dist/commons-beanutils-20151015.jar:/srv/gump/packages/commons-collections3/commons-collections-3.2.1.jar:/srv/gump/public/workspace/apache-commons/cli/target/commons-cli-1.4-SNAPSHOT.jar:/srv/gump/public/workspace/commons-lang-trunk/target/commons-lang3-3.5-SNAPSHOT.ja
 
r:/srv/gump/public/workspace/apache-commons/logging/target/commons-logging-20151015.jar:/srv/gump/public/workspace/apache-commons/logging/target/commons-logging-api-20151015.jar:/srv/gump/packages/guava/guava-18.0.jar
-
Buildfile: /srv/gump/public/workspace/tomcat-trunk/build.xml

build-prepare:
   [delete] Deleting directory 
/srv/gump/public/workspace/tomcat-trunk/output/build/temp
[mkdir] Created dir: 
/srv/gump/public/workspace/tomcat-trunk/output/build/temp

compile-prepare:

download-validate:

testexist:
 [echo] Testing  for 
/srv/gump/public/workspace/checkstyle/target/checkstyle-6.12-SNAPSHOT.jar

setproxy:

downloadfile:

validate:
[mkdir] Created dir: 
/srv/gump/public/workspace/tomcat-trunk/output/res/checkstyle
[checkstyle] Running Checkstyle 6.12-SNAPSHOT on 3060 files
[checkstyle] 
/srv/gump/public/workspace/tomcat-trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestSlowQueryComparator.java:1:
 error: Line does not match expected header line of '^(rem)?\W*Licensed to the 
Apache Software Foundation \(ASF\) under one or more$'.
[checkstyle] 
/srv/gump/public/workspace/tomcat-trunk/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/TestSlowQueryComparator.java:11:
 error: Wrong order for 'org.junit.Assert' import.

BUILD FAILED
/srv/gump/public/workspace/tomcat-trunk/build.xml:550: Got 2 errors and 0 
warnings.

Total time: 1 minute 6 seconds
-

To subscribe to this information via syndicated feeds:
- RSS: 
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-validate/rss.xml
- Atom: 
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-validate/atom.xml

== Gump Tracking Only ===
Produced by Apache Gump(TM) version 2.3.
Gump Run 2015101509, vmgump.apache.org:vmgump:2015101509
Gump E-mail Identifier (unique within run) #3.

--
Apache Gump
http://gump.apache.org/ [Instance: vmgump]

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



Re: Consider support for the Servlet profile of JSR 196 (JASPIC) in Tomcat 7.0.x

2015-10-14 Thread Mark Thomas
On 14/10/2015 13:00, Arjan Tijms wrote:
> Hi there,
> 
> Haven't seen updates for some time here. Wonder what the current
> status is and what exactly happened in the last months. Last commits
> in the Tomcat repo are from 3 months ago.

The GSoC student took the money and ran at the mid-term evaluation. I
should have gone with my first instinct which was to fail them at the
mid-term due to lack of effort.

Getting back to this is on my TODO list for Tomcat 9. I plan to remove
the GSoC work and start again from scratch. While that might seem
excessive I simply do not trust the refactoring that Fjodor completed is
secure. It will be quicker to re-do the work myself than it will be to
check the refactoring line by line.

Mark


> 
> Kind regards,
> Arjan Tijms
> 
> 
> 
> On Thu, Jun 11, 2015 at 10:39 AM, markt [via Tomcat]
>  wrote:
>> On 10/06/2015 16:43, Arjan Tijms wrote:
>>
>>> Hi,
>>>
>>> On Wed, Jun 10, 2015 at 3:28 PM, markt [via Tomcat] <
>>> [hidden email]> wrote:
>>>
 I don't really understand what the requirement is here. Can you expand /
 point me to the part of the spec?

>>>
>>> It's simply that from within a SAM you can forward/include to a Servlet
>>> using a dispatcher, such that the output of that Servlet is inserted in
>>> the
>>> response.
>>
>> Thanks for the clarification. You can do that easily from a Valve in a
>> couple of lines of code. No need for extra internal plumbing that I can see.
>>
>> Mark
>>
>>>
>>> It's in section 3.8.3.4 of the JASPIC spec:
>>>
>>>
>>> "3.8.3.4
>>> Forwards and Includes by Server Authentication Modules
>>>
>>> The message processing runtime must support the acquisition and use of
>>> RequestDispatcher objects by authentication modules within their
>>> processing
>>> of validateRequest.
>>>
>>> Under the constraints defined by RequestDispatcher, authentication modules
>>> must be able to forward and include using the request and response objects
>>> passed in MessageInfo. In particular, an authentication module must be
>>> able
>>> to acquire a RequestDispatcher from the request obtained from MessageInfo,
>>> and uses it to forward the request (and response) to a login form.
>>> Authentication modules should catch and rethrow as an AuthException any
>>> exception thrown by these methods."
>>>
>>>
>>> A test/example showing this in practice is the following:
>>>
>>>
>>> https://github.com/javaee-samples/javaee7-samples/tree/master/jaspic/dispatching
>>>
>>> Specifically, this code shows both an include and a forward done by a SAM:
>>>
>>>   public AuthStatus validateRequest(MessageInfo messageInfo, Subject
>>> clientSubject, Subject serviceSubject) throws AuthException {
>>> try {
>>> HttpServletRequest request = (HttpServletRequest)
>>> messageInfo.getRequestMessage();
>>> HttpServletResponse response = (HttpServletResponse)
>>> messageInfo.getResponseMessage();
>>>
>>> if ("include".equals(request.getParameter("dispatch"))) {
>>> request.getRequestDispatcher("/includedServlet")
>>>.include(request, response);
>>>
>>> // "Do nothing", required protocol when returning SUCCESS
>>> handler.handle(new Callback[] { new
>>> CallerPrincipalCallback(clientSubject, (Principal) null) });
>>>
>>> // When using includes, the response stays open and the
>>> main
>>> // resource can also write to the response
>>> return SUCCESS;
>>>
>>> } else {
>>> request.getRequestDispatcher("/forwardedServlet")
>>>.forward(request, response);
>>>
>>> // MUST NOT invoke the resource, so CAN NOT return SUCCESS
>>> here.
>>> return SEND_CONTINUE;
>>> }
>>>
>>> } catch (IOException | ServletException |
>>> UnsupportedCallbackException e) {
>>> throw (AuthException) new AuthException().initCause(e);
>>> }
>>> }
>>>
>>>
>>> Sounds good. Thanks for the tip.

>>>
>>> You're welcome ;)
>>>
>>> Kind regards,
>>> Arjan Tijms
>>>
>>>
>>>
>>>

 Cheers,

 mark

 -
 To unsubscribe, e-mail: [hidden email]
 
 For additional commands, e-mail: [hidden email]
 



 --
  If you reply to this email, your message will be added to the discussion
 below:


 http://tomcat.10.x6.nabble.com/Consider-support-for-the-Servlet-profile-of-JSR-196-JASPIC-in-Tomcat-7-0-x-tp4993387p5035887.html
  To unsubscribe from Consider support for the Servlet profile of JSR 196
 (JASPIC) in Tomcat 7.0.x, click here
 <
 .
 NAML

 

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

2015-10-14 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-nio 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-nio :  Tomcat 9.x, a web server implementing the Java 
Servlet 4.0,
...


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-nio/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.
 -INFO- Failed with reason build failed
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-trunk/output/logs-NIO
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-trunk/output/test-tmp-NIO/logs
 -WARNING- No directory 
[/srv/gump/public/workspace/tomcat-trunk/output/test-tmp-NIO/logs]



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test-nio/gump_work/build_tomcat-trunk_tomcat-trunk-test-nio.html
Work Name: build_tomcat-trunk_tomcat-trunk-test-nio (Type: Build)
Work ended in a state of : Failed
Elapsed: 39 mins 58 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 
-Djunit.jar=/srv/gump/public/workspace/junit/target/junit-4.13-SNAPSHOT.jar 
-Dobjenesis.jar=/srv/gump/public/workspace/objenesis/main/target/objenesis-2.3-SNAPSHOT.jar
 -Dtest.reports=output/logs-NIO 
-Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20151015-native-src.tar.gz
 -Dexamples.sources.skip=true 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/R-4.5-201506032000/ecj-4.5.jar 
-Dtest.relaxTiming=true 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-20151015.jar
 
-Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-20151015-native-src.tar.gz
 -Dtest.temp=output/test-tmp-NIO -Dtest.accesslog=true -Dexecute.test.nio=true 
-Dtest.openssl.path=/srv/gump/public/workspace/openssl-ma
 ster/dest-20151015/bin/openssl -Dexecute.test.apr=false 
-Dtest.excludePerformance=true -Dexecute.test.nio2=false 
-Deasymock.jar=/srv/gump/public/workspace/easymock/core/target/easymock-3.5-SNAPSHOT.jar
 -Dhamcrest.jar=/srv/gump/packages/hamcrest/hamcrest-core-1.3.jar 
-Dcglib.jar=/srv/gump/packages/cglib/cglib-nodep-2.2.jar test 
[Working Directory: /srv/gump/public/workspace/tomcat-trunk]
CLASSPATH: 
/usr/lib/jvm/java-8-oracle/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-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/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.ja