svn commit: r1531161 - /tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/drawboard/DrawMessage.java
Author: kpreisser Date: Fri Oct 11 01:31:27 2013 New Revision: 1531161 URL: http://svn.apache.org/r1531161 Log: Fix whitespaces Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/drawboard/DrawMessage.java Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/drawboard/DrawMessage.java URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/drawboard/DrawMessage.java?rev=1531161&r1=1531160&r2=1531161&view=diff == --- tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/drawboard/DrawMessage.java (original) +++ tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/drawboard/DrawMessage.java Fri Oct 11 01:31:27 2013 @@ -121,7 +121,6 @@ public final class DrawMessage { public void setLastInChain(boolean lastInChain) { this.lastInChain = lastInChain; } - - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GUMP@vmgump]: Project tomcat-trunk-validate (in module tomcat-trunk) failed
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 12 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 8.x, a web server implementing the Java Servlet 3.1, ... 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: 21 secs Command Line: /usr/lib/jvm/java-7-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-5.7-SNAPSHOT.jar -Dexecute.validate=true validate [Working Directory: /srv/gump/public/workspace/tomcat-trunk] CLASSPATH: /usr/lib/jvm/java-7-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/packages/antlr/antlr-3.1.3.jar:/srv/gump/public/workspace/checkstyle/target/checkstyle-5.7-SNAPSHOT.jar:/srv/gump/public/workspace/apache-commons/beanutils/dist/commons-beanutils-20131011.jar:/srv/gump/public/workspace/apache-commons/cli/target/commons-cli-1.3-SNAPSHOT.jar:/srv/gump/public/workspace/commons-collections-3.x/target/commons-collections-3.3-SNAPSHOT.jar:/srv/gump/public/workspace/apache-commons/exec/tar get/commons-exec-1.1.1-SNAPSHOT.jar:/srv/gump/public/workspace/apache-commons/logging/target/commons-logging-20131011.jar:/srv/gump/public/workspace/apache-commons/logging/target/commons-logging-api-20131011.jar:/srv/gump/public/workspace/apache-commons/validator/dist/commons-validator-20131011.jar:/srv/gump/public/workspace/google-guava/guava/target/guava-16.0-SNAPSHOT.jar:/srv/gump/packages/javamail-1.4/mail.jar:/srv/gump/packages/javamail-1.4/lib/mailapi.jar:/srv/gump/packages/jaf-1.1ea/activation.jar - 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: proxyflags: setproxy: testexist: [echo] Testing for /srv/gump/public/workspace/checkstyle/target/checkstyle-5.7-SNAPSHOT.jar downloadzip: validate: [mkdir] Created dir: /srv/gump/public/workspace/tomcat-trunk/output/res/checkstyle [checkstyle] Running Checkstyle 5.7-SNAPSHOT on 2727 files [checkstyle] /srv/gump/public/workspace/tomcat-trunk/webapps/examples/WEB-INF/classes/websocket/drawboard/DrawMessage.java:121: Line matches the illegal pattern '\s+$'. BUILD FAILED /srv/gump/public/workspace/tomcat-trunk/build.xml:499: Got 1 errors and 0 warnings. Total time: 21 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 2013101104, vmgump.apache.org:vmgump:2013101104 Gump E-mail Identifier (unique within run) #4. -- 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
svn commit: r1531156 - in /tomcat/trunk/webapps/examples: WEB-INF/classes/websocket/drawboard/DrawMessage.java websocket/drawboard.xhtml
Author: kpreisser Date: Fri Oct 11 00:45:16 2013 New Revision: 1531156 URL: http://svn.apache.org/r1531156 Log: Handle coordinates as double instead of int. Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/drawboard/DrawMessage.java tomcat/trunk/webapps/examples/websocket/drawboard.xhtml Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/drawboard/DrawMessage.java URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/drawboard/DrawMessage.java?rev=1531156&r1=1531155&r2=1531156&view=diff == --- tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/drawboard/DrawMessage.java (original) +++ tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/drawboard/DrawMessage.java Fri Oct 11 00:45:16 2013 @@ -19,6 +19,9 @@ package websocket.drawboard; import java.awt.BasicStroke; import java.awt.Color; import java.awt.Graphics2D; +import java.awt.geom.Arc2D; +import java.awt.geom.Line2D; +import java.awt.geom.Rectangle2D; /** * A message that represents a drawing action. @@ -33,7 +36,7 @@ public final class DrawMessage { private int type; private byte colorR, colorG, colorB, colorA; private double thickness; -private int x1, y1, x2, y2; +private double x1, y1, x2, y2; private boolean lastInChain; /** @@ -82,28 +85,28 @@ public final class DrawMessage { this.colorA = colorA; } -public long getX1() { +public double getX1() { return x1; } -public void setX1(int x1) { +public void setX1(double x1) { this.x1 = x1; } -public int getX2() { +public double getX2() { return x2; } -public void setX2(int x2) { +public void setX2(double x2) { this.x2 = x2; } -public int getY1() { +public double getY1() { return y1; } -public void setY1(int y1) { +public void setY1(double y1) { this.y1 = y1; } -public int getY2() { +public double getY2() { return y2; } -public void setY2(int y2) { +public void setY2(double y2) { this.y2 = y2; } @@ -123,8 +126,8 @@ public final class DrawMessage { public DrawMessage(int type, byte colorR, byte colorG, byte colorB, -byte colorA, double thickness, int x1, int x2, int y1, int y2, -boolean lastInChain) { +byte colorA, double thickness, double x1, double x2, double y1, +double y2, boolean lastInChain) { this.type = type; this.colorR = colorR; @@ -153,10 +156,11 @@ public final class DrawMessage { if (type == 1 || type == 2) { // Draw a line. -g.drawLine(x1, y1, x2, y2); +Line2D line = new Line2D.Double(x1, y1, x2, y2); +g.draw(line); } else if (type == 3 || type == 4) { -int x1 = this.x1, x2 = this.x2, +double x1 = this.x1, x2 = this.x2, y1 = this.y1, y2 = this.y2; if (x1 > x2) { x1 = this.x2; @@ -169,11 +173,15 @@ public final class DrawMessage { if (type == 3) { // Draw a rectangle. -g.drawRect(x1, y1, x2 - x1, y2 - y1); +Rectangle2D rect = new Rectangle2D.Double(x1, y1, +x2 - x1, y2 - y1); +g.draw(rect); } else if (type == 4) { // Draw an ellipse. -g.drawArc(x1, y1, x2 - x1, y2 - y1, 0, 360); +Arc2D arc = new Arc2D.Double(x1, y1, x2 - x1, y2 - y1, +0d, 360d, Arc2D.CHORD); +g.draw(arc); } } @@ -200,7 +208,7 @@ public final class DrawMessage { int type; byte[] colors = new byte[4]; double thickness; -int[] coords = new int[4]; +double[] coords = new double[4]; boolean last; try { @@ -219,8 +227,8 @@ public final class DrawMessage { throw new ParseException("Invalid thickness: " + thickness); for (int i = 0; i < coords.length; i++) { -coords[i] = Integer.parseInt(elements[6 + i]); -if (coords[i] < -100L || coords[i] > 100L) +coords[i] = Double.parseDouble(elements[6 + i]); +if (Double.isNaN(coords[i])) throw new ParseException("Invalid coordinate: " + coords[i]); } Modified: tomcat/trunk/webapps/examples/websocket/drawboard.xhtml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/websocket/drawboard.xhtml?rev=1531156&r1=1531155&r2=1531156&view=diff == --- tomcat/trunk/webapps/examples/websocket/drawboard.xhtml (original) +++ tomcat/trunk/webapps/exam
buildbot success in ASF Buildbot on tomcat-trunk
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/5094 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1531127 Blamelist: markt Build succeeded! sincerely, -The Buildbot
Re: [VOTE] Release Apache Tomcat Native 1.1.29
On 10/10/2013 14:18, Mladen Turk wrote: > Version 1.1.29 is bug fixing release. > The proposed release artefacts can be found at [1], > and the build was done using tag [2]. > > The VOTE will remain open for at least 48 hours. > > The Apache Tomcat Native 1.1.29 is > [X] Stable, go ahead and release > [ ] Broken because of ... Unit tests pass on 64-but Windows. 8.0.x trunk build passes some simple tests. Mark > > > [1] http://people.apache.org/~mturk/native/1.1.29 > [2] > https://svn.apache.org/repos/asf/tomcat/native/tags/TOMCAT_NATIVE_1_1_29 > > > Regards - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1531138 - /tomcat/trunk/webapps/examples/websocket/drawboard.xhtml
Author: kpreisser Date: Thu Oct 10 22:33:31 2013 New Revision: 1531138 URL: http://svn.apache.org/r1531138 Log: Follow-Up to r1531130: Also set the correct mouse coordinates when canceling the drawing. Modified: tomcat/trunk/webapps/examples/websocket/drawboard.xhtml Modified: tomcat/trunk/webapps/examples/websocket/drawboard.xhtml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/websocket/drawboard.xhtml?rev=1531138&r1=1531137&r2=1531138&view=diff == --- tomcat/trunk/webapps/examples/websocket/drawboard.xhtml (original) +++ tomcat/trunk/webapps/examples/websocket/drawboard.xhtml Thu Oct 10 22:33:31 2013 @@ -537,6 +537,9 @@ mouseDown = false; currentPreviewPath = null; +currentMouseX = e.pageX - canvasDisplay.offsetLeft; +currentMouseY = e.pageY - canvasDisplay.offsetTop; + refreshDisplayCanvas(); } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1531130 - in /tomcat/trunk/webapps/examples: WEB-INF/classes/websocket/drawboard/DrawMessage.java websocket/drawboard.xhtml
Author: kpreisser Date: Thu Oct 10 22:20:03 2013 New Revision: 1531130 URL: http://svn.apache.org/r1531130 Log: Allow to draw other forms like line, rectangle and circle/ellipse. Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/drawboard/DrawMessage.java tomcat/trunk/webapps/examples/websocket/drawboard.xhtml Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/drawboard/DrawMessage.java URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/drawboard/DrawMessage.java?rev=1531130&r1=1531129&r2=1531130&view=diff == --- tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/drawboard/DrawMessage.java (original) +++ tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/drawboard/DrawMessage.java Thu Oct 10 22:20:03 2013 @@ -34,9 +34,14 @@ public final class DrawMessage { private byte colorR, colorG, colorB, colorA; private double thickness; private int x1, y1, x2, y2; +private boolean lastInChain; /** - * The type. 1: Line. + * The type. + * 1: Brush + * 2: Line + * 3: Rectangle + * 4: Ellipse */ public int getType() { return type; @@ -102,10 +107,24 @@ public final class DrawMessage { this.y2 = y2; } +/** + * Specifies if this DrawMessage is the last one in a chain + * (e.g. a chain of brush paths). + * Currently it is unused. + */ +public boolean isLastInChain() { +return lastInChain; +} +public void setLastInChain(boolean lastInChain) { +this.lastInChain = lastInChain; +} + + public DrawMessage(int type, byte colorR, byte colorG, byte colorB, -byte colorA, double thickness, int x1, int x2, int y1, int y2) { +byte colorA, double thickness, int x1, int x2, int y1, int y2, +boolean lastInChain) { this.type = type; this.colorR = colorR; @@ -117,6 +136,7 @@ public final class DrawMessage { this.x2 = x2; this.y1 = y1; this.y2 = y2; +this.lastInChain = lastInChain; } @@ -125,15 +145,37 @@ public final class DrawMessage { * @param g */ public void draw(Graphics2D g) { -switch (type) { -case 1: + +g.setStroke(new BasicStroke((float) thickness, +BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER)); +g.setColor(new Color(colorR & 0xFF, colorG & 0xFF, colorB & 0xFF, +colorA & 0xFF)); + +if (type == 1 || type == 2) { // Draw a line. -g.setStroke(new BasicStroke((float) thickness, -BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER)); -g.setColor(new Color(colorR & 0xFF, colorG & 0xFF, colorB & 0xFF, -colorA & 0xFF)); g.drawLine(x1, y1, x2, y2); -break; + +} else if (type == 3 || type == 4) { +int x1 = this.x1, x2 = this.x2, +y1 = this.y1, y2 = this.y2; +if (x1 > x2) { +x1 = this.x2; +x2 = this.x1; +} +if (y1 > y2) { +y1 = this.y2; +y2 = this.y1; +} + +if (type == 3) { +// Draw a rectangle. +g.drawRect(x1, y1, x2 - x1, y2 - y1); + +} else if (type == 4) { +// Draw an ellipse. +g.drawArc(x1, y1, x2 - x1, y2 - y1, 0, 360); + +} } } @@ -148,7 +190,8 @@ public final class DrawMessage { return type + "," + (colorR & 0xFF) + "," + (colorG & 0xFF) + "," + (colorB & 0xFF) + "," + (colorA & 0xFF) + "," + thickness -+ "," + x1 + "," + y1 + "," + x2 + "," + y2; ++ "," + x1 + "," + y1 + "," + x2 + "," + y2 + "," ++ (lastInChain ? "1" : "0"); } public static DrawMessage parseFromString(String str) @@ -158,12 +201,13 @@ public final class DrawMessage { byte[] colors = new byte[4]; double thickness; int[] coords = new int[4]; +boolean last; try { String[] elements = str.split(","); type = Integer.parseInt(elements[0]); -if (type != 1) +if (!(type >= 1 && type <= 4)) throw new ParseException("Invalid type: " + type); for (int i = 0; i < colors.length; i++) { @@ -181,6 +225,7 @@ public final class DrawMessage { + coords[i]); } +last = !"0".equals(elements[10]); } catch (RuntimeException ex) { throw new ParseException(ex); @@ -188,7 +233,7 @@ public final class DrawMessage { DrawMessage m = new DrawMessage(type, colors[0], colors[1], colors[2], colors[3], thickness, coords
svn commit: r1531127 - /tomcat/trunk/test/org/apache/catalina/loader/TestVirtualContext.java
Author: markt Date: Thu Oct 10 22:01:14 2013 New Revision: 1531127 URL: http://svn.apache.org/r1531127 Log: Missed a path that needed changing in r1531120 Modified: tomcat/trunk/test/org/apache/catalina/loader/TestVirtualContext.java Modified: tomcat/trunk/test/org/apache/catalina/loader/TestVirtualContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/loader/TestVirtualContext.java?rev=1531127&r1=1531126&r2=1531127&view=diff == --- tomcat/trunk/test/org/apache/catalina/loader/TestVirtualContext.java (original) +++ tomcat/trunk/test/org/apache/catalina/loader/TestVirtualContext.java Thu Oct 10 22:01:14 2013 @@ -278,7 +278,7 @@ public class TestVirtualContext extends ctx.setResources(new StandardRoot(ctx)); File f1 = new File("test/webapp-virtual-webapp/target/classes"); -File f2 = new File("test/webapp-virtual-library/target/classes"); +File f2 = new File("test/webapp-virtual-library/target/WEB-INF/classes"); ctx.getResources().createWebResourceSet( WebResourceRoot.ResourceSetType.POST, "/WEB-INF/classes", f1.getAbsolutePath(), null, "/"); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1531120 - in /tomcat/trunk/test: org/apache/catalina/loader/ webapp-virtual-library/target/WEB-INF/ webapp-virtual-library/target/WEB-INF/classes/ webapp-virtual-library/target/WEB-INF/cl
Author: markt Date: Thu Oct 10 21:37:40 2013 New Revision: 1531120 URL: http://svn.apache.org/r1531120 Log: Fix TestVirtualContext after changes in r1530937 Added: tomcat/trunk/test/webapp-virtual-library/target/WEB-INF/ (with props) tomcat/trunk/test/webapp-virtual-library/target/WEB-INF/C.tld - copied unchanged from r1531109, tomcat/trunk/test/webapp-virtual-library/target/classes/META-INF/C.tld tomcat/trunk/test/webapp-virtual-library/target/WEB-INF/classes/ - copied from r1531109, tomcat/trunk/test/webapp-virtual-library/target/classes/ Removed: tomcat/trunk/test/webapp-virtual-library/target/WEB-INF/classes/META-INF/C.tld tomcat/trunk/test/webapp-virtual-library/target/classes/ Modified: tomcat/trunk/test/org/apache/catalina/loader/TestVirtualContext.java Modified: tomcat/trunk/test/org/apache/catalina/loader/TestVirtualContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/loader/TestVirtualContext.java?rev=1531120&r1=1531119&r2=1531120&view=diff == --- tomcat/trunk/test/org/apache/catalina/loader/TestVirtualContext.java (original) +++ tomcat/trunk/test/org/apache/catalina/loader/TestVirtualContext.java Thu Oct 10 21:37:40 2013 @@ -69,7 +69,7 @@ public class TestVirtualContext extends ctx.setResources(new StandardRoot(ctx)); File f1 = new File("test/webapp-virtual-webapp/target/classes"); -File f2 = new File("test/webapp-virtual-library/target/classes"); +File f2 = new File("test/webapp-virtual-library/target/WEB-INF"); File f3 = new File( "test/webapp-virtual-webapp/src/main/webapp/WEB-INF/classes"); File f4 = new File( @@ -80,7 +80,7 @@ public class TestVirtualContext extends WebResourceRoot.ResourceSetType.POST, "/WEB-INF/classes", f1.getAbsolutePath(), null, "/"); ctx.getResources().createWebResourceSet( -WebResourceRoot.ResourceSetType.POST, "/WEB-INF/classes", +WebResourceRoot.ResourceSetType.POST, "/WEB-INF", f2.getAbsolutePath(), null, "/"); ctx.getResources().createWebResourceSet( WebResourceRoot.ResourceSetType.POST, "/WEB-INF/classes", @@ -159,7 +159,7 @@ public class TestVirtualContext extends allUrls.indexOf("/test/webapp-virtual-webapp/target/classes/rsrc") > 0); assertTrue( allUrls, - allUrls.indexOf("/test/webapp-virtual-library/target/classes/rsrc") > 0); + allUrls.indexOf("/test/webapp-virtual-library/target/WEB-INF/classes/rsrc") > 0); // check that there's no duplicate in the URLs String[] allUrlsArray = allUrls.split("\\s+"); Propchange: tomcat/trunk/test/webapp-virtual-library/target/WEB-INF/ -- bugtraq:append = false Propchange: tomcat/trunk/test/webapp-virtual-library/target/WEB-INF/ -- bugtraq:label = Bugzilla ID (optional) Propchange: tomcat/trunk/test/webapp-virtual-library/target/WEB-INF/ -- --- bugtraq:message (added) +++ bugtraq:message Thu Oct 10 21:37:40 2013 @@ -0,0 +1 @@ +Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=%BUGID% Propchange: tomcat/trunk/test/webapp-virtual-library/target/WEB-INF/ -- bugtraq:url = https://issues.apache.org/bugzilla/show_bug.cgi?id=%BUGID% - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 54095] [patch] support gzipped versions of static resources by DefaultServlet
https://issues.apache.org/bugzilla/show_bug.cgi?id=54095 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #1 from Mark Thomas --- Thanks for the feature suggestion and the patch. This has been added to 8.0.x and will be included in 8.0.0-RC4 onwards. -- 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: r1531115 - in /tomcat/trunk: conf/web.xml java/org/apache/catalina/servlets/DefaultServlet.java test/org/apache/catalina/servlets/TestDefaultServlet.java test/webapp/index.html.gz webapps/
Author: markt Date: Thu Oct 10 21:24:59 2013 New Revision: 1531115 URL: http://svn.apache.org/r1531115 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54095 Add support to the Default Servlet for serving gzipped versions of static resources directly from disk as an alternative to Tomcat compressing them on each request. Patch by Philippe Marschall. Added: tomcat/trunk/test/webapp/index.html.gz (with props) Modified: tomcat/trunk/conf/web.xml tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java tomcat/trunk/test/org/apache/catalina/servlets/TestDefaultServlet.java tomcat/trunk/webapps/docs/changelog.xml tomcat/trunk/webapps/docs/default-servlet.xml Modified: tomcat/trunk/conf/web.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/conf/web.xml?rev=1531115&r1=1531114&r2=1531115&view=diff == --- tomcat/trunk/conf/web.xml (original) +++ tomcat/trunk/conf/web.xml Thu Oct 10 21:24:59 2013 @@ -104,6 +104,10 @@ listings false + +gzip +true + 1 Modified: tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java?rev=1531115&r1=1531114&r2=1531115&view=diff == --- tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java (original) +++ tomcat/trunk/java/org/apache/catalina/servlets/DefaultServlet.java Thu Oct 10 21:24:59 2013 @@ -32,6 +32,7 @@ import java.io.Reader; import java.io.StringReader; import java.io.StringWriter; import java.util.ArrayList; +import java.util.Enumeration; import java.util.Iterator; import java.util.StringTokenizer; @@ -140,6 +141,12 @@ public class DefaultServlet /** + * Should be serve gzip versions of files. By default, it's set to true. + */ +protected boolean gzip = true; + + +/** * The output buffer size to use when serving resources. */ protected int output = 2048; @@ -277,6 +284,9 @@ public class DefaultServlet if (getServletConfig().getInitParameter("readonly") != null) readOnly = Boolean.parseBoolean(getServletConfig().getInitParameter("readonly")); +if (getServletConfig().getInitParameter("gzip") != null) +gzip = Boolean.parseBoolean(getServletConfig().getInitParameter("gzip")); + if (getServletConfig().getInitParameter("sendfileSize") != null) sendfileSize = Integer.parseInt(getServletConfig().getInitParameter("sendfileSize")) * 1024; @@ -754,6 +764,19 @@ public class DefaultServlet resource.setMimeType(contentType); } +// Serve a gzipped version of the file if present +if (gzip +&& checkIfGzip(request) +&& resource.isFile() +&& !path.endsWith(".gz")) { +WebResource gzipResource = resources.getResource(path + ".gz"); +if (gzipResource.exists() && gzipResource.isFile()) { +gzipResource.setMimeType(contentType); +response.addHeader("Content-Encoding", "gzip"); +resource = gzipResource; +} +} + ArrayList ranges = null; long contentLength = -1L; @@ -1681,6 +1704,24 @@ public class DefaultServlet return true; } +/** + * Check if the user agent supports gzip encoding. + * + * @param request The servlet request we are processing + * @return boolean true if the user agent supports gzip encoding, + * and false if the user agent does not support gzip encoding + */ +protected boolean checkIfGzip(HttpServletRequest request) { +Enumeration headers = request.getHeaders("Accept-Encoding"); +while (headers.hasMoreElements()) { +String header = headers.nextElement(); +if (header.indexOf("gzip") != -1) { +return true; +} +} +return false; +} + /** * Check if the if-unmodified-since condition is satisfied. Modified: tomcat/trunk/test/org/apache/catalina/servlets/TestDefaultServlet.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/servlets/TestDefaultServlet.java?rev=1531115&r1=1531114&r2=1531115&view=diff == --- tomcat/trunk/test/org/apache/catalina/servlets/TestDefaultServlet.java (original) +++ tomcat/trunk/test/org/apache/catalina/servlets/TestDefaultServlet.java Thu Oct 10 21:24:59 2013 @@ -89,6 +89,56 @@ public class TestDefaultServlet extends } /** + * Verify serving of gzipped resources from context root. + */ +@Test +public void testGzippedFile() throws Exception {
buildbot success in ASF Buildbot on tomcat-7-trunk
The Buildbot has detected a restored build on builder tomcat-7-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-7-trunk/builds/1462 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1531090 Blamelist: markt Build succeeded! sincerely, -The Buildbot
[Bug 55249] JspC compiles tag files even if compile options is false
https://issues.apache.org/bugzilla/show_bug.cgi?id=55249 --- Comment #4 from Jeremy Boynes --- Adding context in case anyone looks at this. This seemed like odd behaviour for me for someone using JspC. Better would be if JspC either consistently handled JSP and Tag files - either compiling both or compiling neither. If it has to have a compiler to handle the tags, then it could use that to go directly from JSP source to bytecode and eliminate the need to run after pre-compilation. However, if someone wanted more control over the compilation process (e.g. using a different compiler or combining that step with non-JSP source) then they would want that to apply to both JSP and Tag code. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: LATER vs WONTFIX, was: [Bug 55249] JspC compiles tag files even if compile options is false
On 10/10/2013 21:41, Jeremy Boynes wrote: > On Oct 10, 2013, at 12:46 PM, Mark Thomas > wrote: > >> On 10/10/2013 20:40, Jeremy Boynes wrote: >>> On Oct 10, 2013, at 7:48 AM, bugzi...@apache.org wrote: >>> https://issues.apache.org/bugzilla/show_bug.cgi?id=55249 Mark Thomas changed: What|Removed |Added >> Status|NEW |RESOLVED Resolution|--- |WONTFIX >>> >>> Is LATER a better status for this? I was planning to look in to >>> this at some point, it's just work has kept me busy the last >>> few weeks. >> >> Obtaining the information required via a route other than >> compilation is likely to be more expensive that the compilation >> step. I doubt any patch is worth the effort so WONTFIX seems >> appropriate. It doesn't prevent a fix at a later date. > > This was more for my thinking on Bugzilla status. I think of > WONTFIX as being "we will never do this because of technical reason > X so a patch is unlikely to be applied" Which is where I think we are on this one. Having looked into it, I viable patch that isn't hugely more complex and expensive than what we have seems very unlikely. > vs. LATER being "we have no plans to do this but would consider a > patch." Those just tend to get left as open enhancement requests. We don't really use the LATER status at all. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
LATER vs WONTFIX, was: [Bug 55249] JspC compiles tag files even if compile options is false
On Oct 10, 2013, at 12:46 PM, Mark Thomas wrote: > On 10/10/2013 20:40, Jeremy Boynes wrote: >> On Oct 10, 2013, at 7:48 AM, bugzi...@apache.org wrote: >> >>> https://issues.apache.org/bugzilla/show_bug.cgi?id=55249 >>> >>> Mark Thomas changed: >>> >>> What|Removed |Added >>> >>> >>> > Status|NEW |RESOLVED >>> Resolution|--- |WONTFIX >> >> Is LATER a better status for this? I was planning to look in to >> this at some point, it's just work has kept me busy the last few >> weeks. > > Obtaining the information required via a route other than compilation > is likely to be more expensive that the compilation step. I doubt any > patch is worth the effort so WONTFIX seems appropriate. It doesn't > prevent a fix at a later date. This was more for my thinking on Bugzilla status. I think of WONTFIX as being "we will never do this because of technical reason X so a patch is unlikely to be applied" vs. LATER being "we have no plans to do this but would consider a patch." Cheers Jeremy signature.asc Description: Message signed with OpenPGP using GPGMail
Re: svn commit: r1530081 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
On 10/10/2013 21:30, Konstantin Preißer wrote: > Mark, > >> -Original Message- >> From: Mark Thomas [mailto:ma...@apache.org] >> Sent: Thursday, October 10, 2013 10:03 PM > >> OK. Try now. You will probably still see the odd NPE but the other >> issues should be fixed. > > Thank you very much. > I tried with 1531087 and can confirm that I still see that NPE, but I don't > see any other problems anymore (Tomcat will respond on each TCP connection). > The thread dump shows 2 ClientPoller threads after the NPE. Excellent. Thanks for the feedback. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
RE: svn commit: r1530081 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
Mark, > -Original Message- > From: Mark Thomas [mailto:ma...@apache.org] > Sent: Thursday, October 10, 2013 10:03 PM > OK. Try now. You will probably still see the odd NPE but the other > issues should be fixed. Thank you very much. I tried with 1531087 and can confirm that I still see that NPE, but I don't see any other problems anymore (Tomcat will respond on each TCP connection). The thread dump shows 2 ClientPoller threads after the NPE. Regards, Konstantin Preißer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: jasper changes for 8.0: genStringAsCharArray
On Oct 9, 2013, at 3:11 AM, Pavel Cibulka wrote: > Hello, both jetty and glassfish have genStringAsByteArray set to "true" by > default. Would it be possible to change this in jasper? I know > that genStringAsByteArray is not implemented yet, what about > making genStringAsCharArray default "true" for now? Is this actually more efficient still? AIUI, both forms turn into a call to System.arrayCopy from the source array to the buffer and the setup code (checking bounds etc.) is something I would expect a JIT to elide for both forms. Cheers Jeremy signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r1531099 - in /tomcat/trunk/java/org/apache: catalina/webresources/TomcatURLStreamHandlerFactory.java tomcat/InstrumentableClassLoader.java tomcat/util/net/AprEndpoint.java
Author: markt Date: Thu Oct 10 20:16:06 2013 New Revision: 1531099 URL: http://svn.apache.org/r1531099 Log: Javadoc fixes. Modified: tomcat/trunk/java/org/apache/catalina/webresources/TomcatURLStreamHandlerFactory.java tomcat/trunk/java/org/apache/tomcat/InstrumentableClassLoader.java tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Modified: tomcat/trunk/java/org/apache/catalina/webresources/TomcatURLStreamHandlerFactory.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/webresources/TomcatURLStreamHandlerFactory.java?rev=1531099&r1=1531098&r2=1531099&view=diff == --- tomcat/trunk/java/org/apache/catalina/webresources/TomcatURLStreamHandlerFactory.java (original) +++ tomcat/trunk/java/org/apache/catalina/webresources/TomcatURLStreamHandlerFactory.java Thu Oct 10 20:16:06 2013 @@ -64,10 +64,10 @@ public class TomcatURLStreamHandlerFacto * Register this factory with the JVM. May be called more than once. The * implementation ensures that registration only occurs once. * - * @returns true if the factory is already registered with the - * JVM or was successfully registered as a result of this call. - * false if the factory was disabled prior to this - * call. + * @return true if the factory is already registered with the + * JVM or was successfully registered as a result of this call. + * false if the factory was disabled prior to this + * call. */ public static boolean register() { return getInstanceInternal(true).isRegistered(); @@ -78,10 +78,10 @@ public class TomcatURLStreamHandlerFacto * Prevent this this factory from registering with the JVM. May be called * more than once. * - * @returns true if the factory is already disabled or was - * successfully disabled as a result of this call. - * false if the factory was already registered prior - * to this call. + * @return true if the factory is already disabled or was + * successfully disabled as a result of this call. + * false if the factory was already registered prior + * to this call. */ public static boolean disable() { Modified: tomcat/trunk/java/org/apache/tomcat/InstrumentableClassLoader.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/InstrumentableClassLoader.java?rev=1531099&r1=1531098&r2=1531099&view=diff == --- tomcat/trunk/java/org/apache/tomcat/InstrumentableClassLoader.java (original) +++ tomcat/trunk/java/org/apache/tomcat/InstrumentableClassLoader.java Thu Oct 10 20:16:06 2013 @@ -43,7 +43,7 @@ public interface InstrumentableClassLoad * classes loaded by this class loader after the invocation of this * method. * - * @param classFileTransformer The transformer to add to the class loader + * @param transformer The transformer to add to the class loader * @throws IllegalArgumentException if the {@literal transformer} is null. */ void addTransformer(ClassFileTransformer transformer); @@ -55,7 +55,7 @@ public interface InstrumentableClassLoad * However, any classes already instrumented by this transformer before * this method call will remain in their instramented state. * - * @param classFileTransformer The transformer to remove + * @param transformer The transformer to remove */ void removeTransformer(ClassFileTransformer transformer); Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1531099&r1=1531098&r2=1531099&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Thu Oct 10 20:16:06 2013 @@ -1158,8 +1158,8 @@ public class AprEndpoint extends Abstrac /** * Removes the specified socket from the poller. * - * @returns The configured timeout for the socket or zero if the socket - * was not in the list of socket timeouts + * @return The configured timeout for the socket or zero if the socket + * was not in the list of socket timeouts */ public long remove(long socket) { long result = 0; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1530081 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
On 10/10/2013 18:43, Mark Thomas wrote: > On 10/10/2013 18:40, Konstantin Preißer wrote: >> Hi Mark, >> >>> -Original Message- >>> From: Mark Thomas [mailto:ma...@apache.org] >>> Sent: Thursday, October 10, 2013 7:37 PM >> >>> Thanks. Can you just check how many poller threads you get on a clean >>> start? I'd expect 2 in most cases. >> >> Yes, I see two "ClientPoller" threads after a clean start. > > OK. I see what is going on now. > > The short NPE stack trace you reported earlier in this thread is > triggering the Poller to close. > > Most of the problems you are seeing are related to that Poller close. I > want to spend some time trying to figure out how the NPE happens in the > first place but fixing the Poller close should be pretty simple. OK. Try now. You will probably still see the odd NPE but the other issues should be fixed. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1531090 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/net/NioEndpoint.java
Author: markt Date: Thu Oct 10 20:03:00 2013 New Revision: 1531090 URL: http://svn.apache.org/r1531090 Log: Fix a bug introduced in r1357039 that removed a local close variable which mean that code that should of triggered a socket close, ended up closing the Poller as well. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1531087 Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1531090&r1=1531089&r2=1531090&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Thu Oct 10 20:03:00 2013 @@ -1250,18 +1250,19 @@ public class NioEndpoint extends Abstrac } else { if ( isWorkerAvailable() ) { unreg(sk, attachment, sk.readyOps()); +boolean closeSocket = false; // Read goes before write if (sk.isReadable()) { if (!processSocket(channel, SocketStatus.OPEN_READ, true)) { -close = true; +closeSocket = true; } } -if (!close && sk.isWritable()) { +if (!closeSocket && sk.isWritable()) { if (!processSocket(channel, SocketStatus.OPEN_WRITE, true)) { -close = true; +closeSocket = true; } } -if (close) { +if (closeSocket) { cancelledKey(sk,SocketStatus.DISCONNECT,false); } } else { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1531087 - /tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
Author: markt Date: Thu Oct 10 19:59:30 2013 New Revision: 1531087 URL: http://svn.apache.org/r1531087 Log: Fix a bug introduced in r1357039 that removed a local close variable which mean that code that should of triggered a socket close, ended up closing the Poller as well. Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1531087&r1=1531086&r2=1531087&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Thu Oct 10 19:59:30 2013 @@ -1158,18 +1158,19 @@ public class NioEndpoint extends Abstrac } else { if ( isWorkerAvailable() ) { unreg(sk, attachment, sk.readyOps()); +boolean closeSocket = false; // Read goes before write if (sk.isReadable()) { if (!processSocket(channel, SocketStatus.OPEN_READ, true)) { -close = true; +closeSocket = true; } } -if (!close && sk.isWritable()) { +if (!closeSocket && sk.isWritable()) { if (!processSocket(channel, SocketStatus.OPEN_WRITE, true)) { -close = true; +closeSocket = true; } } -if (close) { +if (closeSocket) { cancelledKey(sk,SocketStatus.DISCONNECT); } } else { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Tomcat Native 1.1.29
Mladen, On 10/10/13 9:18 AM, Mladen Turk wrote: > Version 1.1.29 is bug fixing release. > The proposed release artefacts can be found at [1], > and the build was done using tag [2]. > > The VOTE will remain open for at least 48 hours. > > The Apache Tomcat Native 1.1.29 is > [X] Stable, go ahead and release > [ ] Broken because of ... Builds fine on Linux 2.6 x86_64 against OpenSSL 1.0.1e, APR 1.4.6. I beat on it with ab for a while with no ill effects: $ ab -n 99 -c 50 -k http://localhost/webapp/static_resource.html ... Document Length:3460 bytes Concurrency Level: 50 Time taken for tests: 101.474 seconds Complete requests: 99 Failed requests:0 Write errors: 0 Keep-Alive requests:990022 Total transferred: 3711946403 bytes HTML transferred: 3459996540 bytes Requests per second:9854.73 [#/sec] (mean) Time per request: 5.074 [ms] (mean) Time per request: 0.101 [ms] (mean, across all concurrent requests) Transfer rate: 35722.92 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect:00 0.3 0 32 Processing: 05 100.1 3 10009 Waiting:05 100.1 3 10009 Total: 05 100.1 3 10009 Percentage of the requests served within a certain time (ms) 50% 3 66% 4 75% 4 80% 5 90% 6 95% 12 98% 16 99% 20 100% 10009 (longest request) -chris signature.asc Description: OpenPGP digital signature
Re: [Bug 55249] JspC compiles tag files even if compile options is false
On 10/10/2013 20:40, Jeremy Boynes wrote: > On Oct 10, 2013, at 7:48 AM, bugzi...@apache.org wrote: > >> https://issues.apache.org/bugzilla/show_bug.cgi?id=55249 >> >> Mark Thomas changed: >> >> What|Removed |Added >> >> >> Status|NEW |RESOLVED >> Resolution|--- |WONTFIX > > Is LATER a better status for this? I was planning to look in to > this at some point, it's just work has kept me busy the last few > weeks. Obtaining the information required via a route other than compilation is likely to be more expensive that the compilation step. I doubt any patch is worth the effort so WONTFIX seems appropriate. It doesn't prevent a fix at a later date. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [Bug 55249] JspC compiles tag files even if compile options is false
On Oct 10, 2013, at 7:48 AM, bugzi...@apache.org wrote: > https://issues.apache.org/bugzilla/show_bug.cgi?id=55249 > > Mark Thomas changed: > > What|Removed |Added > > Status|NEW |RESOLVED > Resolution|--- |WONTFIX Is LATER a better status for this? I was planning to look in to this at some point, it's just work has kept me busy the last few weeks. Thanks Jeremy signature.asc Description: Message signed with OpenPGP using GPGMail
[Bug 55620] When using startup.bat if apache-tomcat-7.0.xx is in directory with "," (comma) or ";" (semi-colon) Tomcat fails to start
https://issues.apache.org/bugzilla/show_bug.cgi?id=55620 --- Comment #7 from Christopher Schultz --- Aw. I had a patch waiting to be committed. Mine would have worked under Cygwin, 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
Re: svn commit: r1530081 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
On 10/10/2013 18:40, Konstantin Preißer wrote: > Hi Mark, > >> -Original Message- >> From: Mark Thomas [mailto:ma...@apache.org] >> Sent: Thursday, October 10, 2013 7:37 PM > >> Thanks. Can you just check how many poller threads you get on a clean >> start? I'd expect 2 in most cases. > > Yes, I see two "ClientPoller" threads after a clean start. OK. I see what is going on now. The short NPE stack trace you reported earlier in this thread is triggering the Poller to close. Most of the problems you are seeing are related to that Poller close. I want to spend some time trying to figure out how the NPE happens in the first place but fixing the Poller close should be pretty simple. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
RE: svn commit: r1530081 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
Hi Mark, > -Original Message- > From: Mark Thomas [mailto:ma...@apache.org] > Sent: Thursday, October 10, 2013 7:37 PM > Thanks. Can you just check how many poller threads you get on a clean > start? I'd expect 2 in most cases. Yes, I see two "ClientPoller" threads after a clean start. Here is a thread dump after clean start: 2013-10-10 19:39:05 Full thread dump Java HotSpot(TM) 64-Bit Server VM (24.0-b56 mixed mode): "http-nio-8784-Acceptor-0" daemon prio=6 tid=0x0a826000 nid=0x27e8 runnable [0x0c9ce000] java.lang.Thread.State: RUNNABLE at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method) at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:241) - locked <0xef0026b0> (a java.lang.Object) at org.apache.tomcat.util.net.NioEndpoint$Acceptor.run(NioEndpoint.java:714) at java.lang.Thread.run(Thread.java:724) "http-nio-8784-ClientPoller-1" daemon prio=6 tid=0x0ae73000 nid=0x1bd0 runnable [0x0c78f000] java.lang.Thread.State: RUNNABLE at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method) at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.java:296) at sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(WindowsSelectorImpl.java:278) at sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:159) at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:87) - locked <0xedcc3748> (a sun.nio.ch.Util$2) - locked <0xedcc3738> (a java.util.Collections$UnmodifiableSet) - locked <0xedcc35e8> (a sun.nio.ch.WindowsSelectorImpl) at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:98) at org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:1074) at java.lang.Thread.run(Thread.java:724) "http-nio-8784-ClientPoller-0" daemon prio=6 tid=0x0ae72800 nid=0xa78 runnable [0x0c30f000] java.lang.Thread.State: RUNNABLE at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method) at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.java:296) at sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(WindowsSelectorImpl.java:278) at sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:159) at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:87) - locked <0xedcbf548> (a sun.nio.ch.Util$2) - locked <0xedcbf538> (a java.util.Collections$UnmodifiableSet) - locked <0xedcbf3e8> (a sun.nio.ch.WindowsSelectorImpl) at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:98) at org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:1074) at java.lang.Thread.run(Thread.java:724) "ContainerBackgroundProcessor[StandardEngine[Catalina]]" daemon prio=6 tid=0x0aae3000 nid=0x19e0 waiting on condition [0x0c0ff000] java.lang.Thread.State: TIMED_WAITING (sleeping) at java.lang.Thread.sleep(Native Method) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1331) at java.lang.Thread.run(Thread.java:724) "Thread-4" daemon prio=6 tid=0x0af7a800 nid=0x1a5c runnable [0x0bfdf000] java.lang.Thread.State: RUNNABLE at sun.nio.ch.Iocp.getQueuedCompletionStatus(Native Method) at sun.nio.ch.Iocp.access$300(Iocp.java:46) at sun.nio.ch.Iocp$EventHandlerTask.run(Iocp.java:333) at java.lang.Thread.run(Thread.java:724) "NioBlockingSelector.BlockPoller-1" daemon prio=6 tid=0x0aaa0800 nid=0xcbc runnable [0x09d0e000] java.lang.Thread.State: RUNNABLE at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method) at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.java:296) at sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(WindowsSelectorImpl.java:278) at sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:159) at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:87) - locked <0xeeffeb90> (a sun.nio.ch.Util$2) - locked <0xeeffeb80> (a java.util.Collections$UnmodifiableSet) - locked <0xeeffea10> (a sun.nio.ch.WindowsSelectorImpl) at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:98) at org.apache.tomcat.util.net.NioBlockingSelector$BlockPoller.run(NioBlockingSelector.java:342) "GC Daemon" daemon prio=2 tid=0x0a7e4800 nid=0x1988 in Object.wait() [0x0b9df000] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0xc04031b8> (a sun.misc.GC$LatencyLock) at sun.misc.GC$Daemon.run(GC.java:117) - locked <0xc04031b8> (a sun.misc.GC$LatencyLock) "AsyncFileHandler
Re: svn commit: r1530081 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
On 10/10/2013 18:33, Konstantin Preißer wrote: > Hi Mark, > >> -Original Message- >> From: Mark Thomas [mailto:ma...@apache.org] >> Sent: Thursday, October 10, 2013 7:11 PM > >>> What is interesting is that after this happens and I telnet to the >>> server for manually sending a request, then every (2n)th TCP >>> connection works (Tomcat replies and closes the connection after the >>> 20s timeout), but every (2n + 1)th connection does not work (there >>> Tomcat does not respond and is never half-closing the connection). >> >> Now that is very interesting. It suggests one of the two Pollers has >> locked up somehow. Could you take a thread dump when this happens as I >> can't reproduce it. I'd love to know what that thread is doing. > > Sure, here is a thread dump taken after the problems occured (Note: I > modified the default server.xml to remove the AJP connector and for the HTTP > connector change the port from 8080 to 8783 - that were the only changes I > made). Thanks. Can you just check how many poller threads you get on a clean start? I'd expect 2 in most cases. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
RE: svn commit: r1530081 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
Hi Mark, > -Original Message- > From: Mark Thomas [mailto:ma...@apache.org] > Sent: Thursday, October 10, 2013 7:11 PM > > What is interesting is that after this happens and I telnet to the > > server for manually sending a request, then every (2n)th TCP > > connection works (Tomcat replies and closes the connection after the > > 20s timeout), but every (2n + 1)th connection does not work (there > > Tomcat does not respond and is never half-closing the connection). > > Now that is very interesting. It suggests one of the two Pollers has > locked up somehow. Could you take a thread dump when this happens as I > can't reproduce it. I'd love to know what that thread is doing. Sure, here is a thread dump taken after the problems occured (Note: I modified the default server.xml to remove the AJP connector and for the HTTP connector change the port from 8080 to 8783 - that were the only changes I made). 2013-10-10 19:31:49 Full thread dump Java HotSpot(TM) 64-Bit Server VM (24.0-b56 mixed mode): "http-nio-8783-exec-10" daemon prio=6 tid=0x0b00b800 nid=0x2294 waiting on condition [0x0d76f000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0xc14cd958> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2043) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:104) at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:32) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1068) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) "http-nio-8783-exec-9" daemon prio=6 tid=0x09c8d800 nid=0x175c waiting on condition [0x0ca2e000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0xc14cd958> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2043) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:104) at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:32) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1068) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) "http-nio-8783-exec-8" daemon prio=6 tid=0x09c8c800 nid=0x2388 waiting on condition [0x0d3df000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0xc14cd958> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2043) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:104) at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:32) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1068) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) "http-nio-8783-exec-7" daemon prio=6 tid=0x09c8c000 nid=0x1770 waiting on condition [0x0d54f000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0xc14cd958> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2043) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at org.apache.tomcat.util.threads.TaskQue
Re: svn commit: r1530081 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
On 10/10/2013 17:42, Konstantin Preißer wrote: >> -Original Message- From: Konstantin Preißer >> [mailto:kpreis...@apache.org] Sent: Thursday, October 10, 2013 6:02 >> PM > >> After this happens, then when I close all browsers on every machine >> and open new instances to make new HTTP requests (with IE, Chrome >> and Firefox), then sometimes Tomcat replies, but sometimes not. > > What is interesting is that after this happens and I telnet to the > server for manually sending a request, then every (2n)th TCP > connection works (Tomcat replies and closes the connection after the > 20s timeout), but every (2n + 1)th connection does not work (there > Tomcat does not respond and is never half-closing the connection). Now that is very interesting. It suggests one of the two Pollers has locked up somehow. Could you take a thread dump when this happens as I can't reproduce it. I'd love to know what that thread is doing. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
RE: svn commit: r1530081 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
> -Original Message- > From: Konstantin Preißer [mailto:kpreis...@apache.org] > Sent: Thursday, October 10, 2013 6:02 PM > After this happens, then when I close all browsers on every machine and > open new instances to make new HTTP requests (with IE, Chrome and > Firefox), then sometimes Tomcat replies, but sometimes not. What is interesting is that after this happens and I telnet to the server for manually sending a request, then every (2n)th TCP connection works (Tomcat replies and closes the connection after the 20s timeout), but every (2n + 1)th connection does not work (there Tomcat does not respond and is never half-closing the connection). Regards, Konstantin Preißer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
RE: svn commit: r1530081 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
Hi Mark, > -Original Message- > From: Mark Thomas [mailto:ma...@apache.org] > Sent: Thursday, October 10, 2013 5:22 PM > I still can't reproduce this. I have Tomcat running in a VM with the > bandwidth limited to 192Kbps and two separate machines accessing the > drawing board. Can you try to reproduce this without the TCP forwarder > in the mix just to make sure there isn't an issue there? > > I do see the odd stray connection but it looks to be something the > browser is holding on to. As soon as I close the browser, the connection > drops. Yes, I reproduced the issue without the TCP forwarder (Firefox connecting directly to Tomcat). I just tried it again, and it seems the issue is somewhat hard to reproduce - I had to try this (Pressing F5) several minutes until the problems showed up again (the NPE in NioEndpoint.processSocket(), Firefox is unable to make a new HTTP request to Tomcat, and Tomcat closed an existing WebSocket connection from the other machine). After this happens, then when I close all browsers on every machine and open new instances to make new HTTP requests (with IE, Chrome and Firefox), then sometimes Tomcat replies, but sometimes not. Regards, Konstantin Preißer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Tomcat Wiki] Update of "PoweredBy" by RoseHosting
Dear Wiki user, You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change notification. The "PoweredBy" page has been changed by RoseHosting: https://wiki.apache.org/tomcat/PoweredBy?action=diff&rev1=469&rev2=470 === RimuHosting.com === {{http://blog.rimuhosting.com/wp-content/themes/rimuhosting/images/logo2.png}} [[http://www.rimuhosting.com|RimuHosting.com VPS with Tomcat Web Hosting]] - provides a VPS and support for you to host your Tomcat the way you want. + === RoseHosting === + [[http://www.rosehosting.com|{{http://www.rosehosting.com/images/logo.png|RoseHosting}}]] [[http://www.rosehosting.com|RoseHosting.com]] - specializes in high quality managed [[http://www.rosehosting.com/tomcat-hosting.html|Tomcat Hosting]]. RoseHosting.com has been in service since 2001 providing reliable Tomcat [[http://www.rosehosting.com/linux-vps-hosting.html|Linux VPS hosting]] solutions to individuals and businesses. + === RSHosting.co.uk === {{http://www.rshosting.co.uk/images/logo3.jpg}} [[http://www.rshosting.co.uk|RSHosting.co.uk UK Tomcat Web Hosting]] - provides Tomcat Web Hosting on our Linux and Windows servers in UK. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Tomcat Wiki] Update of "ContributorsGroup" by markt
Dear Wiki user, You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change notification. The "ContributorsGroup" page has been changed by markt: https://wiki.apache.org/tomcat/ContributorsGroup?action=diff&rev1=10&rev2=11 * ShawnYu * DmytroMrachkovskyi * GFUCyrusAG + * RoseHosting - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1530081 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
On 10/10/2013 14:41, Konstantin Preißer wrote: > Hi Mark, > >> -Original Message- >> From: Mark Thomas [mailto:ma...@apache.org] >> Sent: Thursday, October 10, 2013 10:53 AM >> To: Tomcat Developers List >> Subject: Re: svn commit: r1530081 - >> /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java >> 2) What is a bit more severe is that sometimes after pressing F5 a lot of >> times, Firefox cannot establish a Websocket connection or make another >> HTTP request to Tomcat. >> >> I can't reproduce this. It is possible that the fix for 1 also fixed >> this. Can you test? >> >> What I did see was that with a lot of refreshes, Firefox ended up with >> two connections open when it should only have had one. Closing the >> browser fixed that. > > Thanks. > > Yes, I can still reproduce this on trunk with r1530937. > > What I did was: > I started Tomcat on a server (connected over internet, not LAN, so the > latency/speed is not as good as in a LAN) and started Tomcat. Then, on two > machines I opened the drawboard example and drew something on it so that the > PNG images gets big (about 500 KB). Then on both machines I simultaneously > pressed F5 (either holding it down for some seconds, or press it manually > when Firefox was in the middle of receiving the PNG image). > After some time where I stopped, the drawboard mentioned 3 connected players > instead of 2. Then I closed Firefox on machine A - it reported 2 players. I > reopened firefox - 3 players. Then I closed Firefox on machine B - still 2 > players. I reopened Firefox on machine B - then it tried to establish a new > websocket connection (the .xhtml page was probably loaded from the cache), > but after 5 seconds, it displayed "Websocket closed" so it couldn't establish > a new connection - at the same time on the other machine the player count > went down to 1. > Then, on machine B I pressed F5 again, but now Firefox couldn't even load the > .xhtml page, and on Tomcat the NPE showed up again: > > 10-Oct-2013 15:05:49.249 SEVERE [http-nio-8783-ClientPoller-0] > org.apache.tomcat.util.net.NioEndpoint.processSocket Error allocating socket > processor > java.lang.NullPointerException > at > org.apache.tomcat.util.net.NioEndpoint.processSocket(NioEndpoint.java:624) > at > org.apache.tomcat.util.net.NioEndpoint$Poller.processKey(NioEndpoint.java:1163) > at > org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:1121) > at java.lang.Thread.run(Thread.java:724) > > (and as I'm writing this, Firefox still seems to wait for a reply from Tomcat. > > After that I have pressed ESC to abort loading and pressed F5 again, but > still no new websocket connection. > > Then I took my TCP forwarder tool to see what data is actually sent on the > TCP connections from and to Tomcat. This is what happened: > 1) Firefox opened Connection 1 and sent "GET > /examples/websocket/drawboard.xhtml HTTP/1.1" request to Tomcat. > 2) On Connection 1, Tomcat replied with a correct reply with the contents of > the drawboard.xhtml file. > 3) On Connection 1, Firefox sent "GET /favicon.ico HTTP/1.1" request to > Tomcat. > 4) Firefox established two new TCP connections (3 and 4) to Tomcat. > 5) On Connection 1, Tomcat replied with the correct contents of "favicon.ico". > 6) On Connection 2, Firefox sends "GET /examples/websocket/drawboard > HTTP/1.1" request to Tomcat with WebSocket headers to open the WebSocket > connection. > 7) Nothing happens. > 8) After some time Firefox half-closed connections 1 and 3, and Tomcat > full-closed them. > 9) I shutdown Firefox so connection 2 was half-closed by the Client, but > Tomcat did not full-close it so it is still active on the TCP forwarder. > > Then I killed the TCP forwarder and opened it and Firefox again, but this > time Tomcat even did not response on the "GET > /examples/websocket/drawboard.xhtml HTTP/1.1" request. After I closed > Firefox, then again the connection where that request was sent was still hold > open by Tomcat. After some minutes, the forwarder received a Timeout error on > the TCP connection that was still held open by Tomcat (SocketError: TimedOut > (10060)). > > > Hope this helps, I still can't reproduce this. I have Tomcat running in a VM with the bandwidth limited to 192Kbps and two separate machines accessing the drawing board. Can you try to reproduce this without the TCP forwarder in the mix just to make sure there isn't an issue there? I do see the odd stray connection but it looks to be something the browser is holding on to. As soon as I close the browser, the connection drops. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55249] JspC compiles tag files even if compile options is false
https://issues.apache.org/bugzilla/show_bug.cgi?id=55249 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |WONTFIX --- Comment #3 from Mark Thomas --- I took a look at this but the assumption that tag files are compiled runs through a considerable portion of the Jasper code. I started to try and untangle it and got so far (the compilation step, the dependencies) but building the TagHandlerInfo from source is non-trivial. It could be done but I am not convinced it is worth doing. -- 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: r1530989 - /tomcat/trunk/webapps/examples/websocket/drawboard.xhtml
Author: kpreisser Date: Thu Oct 10 14:21:24 2013 New Revision: 1530989 URL: http://svn.apache.org/r1530989 Log: Rather than only be able to pause websocket message, pause entire calls to event handler so that we can also pause the socket.onclose event handler. Modified: tomcat/trunk/webapps/examples/websocket/drawboard.xhtml Modified: tomcat/trunk/webapps/examples/websocket/drawboard.xhtml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/websocket/drawboard.xhtml?rev=1530989&r1=1530988&r2=1530989&view=diff == --- tomcat/trunk/webapps/examples/websocket/drawboard.xhtml (original) +++ tomcat/trunk/webapps/examples/websocket/drawboard.xhtml Thu Oct 10 14:21:24 2013 @@ -106,49 +106,44 @@ function Room(drawContainer) { -/* A pausable message handler that can be used for - * the WebSocket's onmessage event (e.g. when we need to wait +/* A pausable event forwarder that can be used to pause and + * resume handling of events (e.g. when we need to wait * for a Image's load event before we can process further * WebSocket messages). - * The object's handleMessageInternal(message) method - * should be called from socket.onmessage. - * The object's messageHandler should be set to the - * function which is actually processing the message. - * Call pauseMessageProcessing() to pause processing and - * resumeMessageProcessing() to resume it. + * The object's callFunction(func) should be called from an + * event handler and give the function to handle the event as + * argument. + * Call pauseProcessing() to suspend event forwarding and + * resumeProcessing() to resume it. */ -function PausableMessageHandler() { +function PausableEventForwarder() { -var pauseMessageProcessing = false; -// Queue for buffering incoming messages until they -// can be processed. -var messageQueue = []; +var pauseProcessing = false; +// Queue for buffering functions to be called. +var functionQueue = []; - -this.messageHandler = function(message) { }; - -this.handleMessageInternal = function(message) { +this.callFunction = function(func) { // If message processing is paused, we push it // into the queue - otherwise we process it directly. -if (pauseMessageProcessing) { -messageQueue.push(message); +if (pauseProcessing) { +functionQueue.push(func); } else { -this.messageHandler(message); +func(); } }; -this.pauseMessageProcessing = function() { -pauseMessageProcessing = true; +this.pauseProcessing = function() { +pauseProcessing = true; }; -this.resumeMessageProcessing = function() { -pauseMessageProcessing = false; +this.resumeProcessing = function() { +pauseProcessing = false; -// Process all queued messages until some handler calls -// pauseMessageProcessing() again. -while (messageQueue.length > 0 && !pauseMessageProcessing) { -var msg = messageQueue.pop(); -this.messageHandler(msg); +// Process all queued functions until some handler calls +// pauseProcessing() again. +while (functionQueue.length > 0 && !pauseProcessing) { +var func = functionQueue.pop(); +func(); } }; } @@ -254,16 +249,16 @@ + "/examples/websocket/drawboard"; socket = new WebSocket(host); -/* If processing of messages should be paused. +/* Use a pausable event forwarder. * This is needed when we load an Image object with data * from a previous message, because we must wait until the * Image's load event it raised before we can use it (and * in the meantime the socket.mess
buildbot failure in ASF Buildbot on tomcat-trunk
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/5089 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1530937 Blamelist: markt BUILD FAILED: failed compile_1 sincerely, -The Buildbot
RE: svn commit: r1530081 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
Hi Mark, > -Original Message- > From: Mark Thomas [mailto:ma...@apache.org] > Sent: Thursday, October 10, 2013 10:53 AM > To: Tomcat Developers List > Subject: Re: svn commit: r1530081 - > /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java > > >> 2) What is a bit more severe is that sometimes after pressing F5 a lot of > times, Firefox cannot establish a Websocket connection or make another > HTTP request to Tomcat. > > I can't reproduce this. It is possible that the fix for 1 also fixed > this. Can you test? > > What I did see was that with a lot of refreshes, Firefox ended up with > two connections open when it should only have had one. Closing the > browser fixed that. Thanks. Yes, I can still reproduce this on trunk with r1530937. What I did was: I started Tomcat on a server (connected over internet, not LAN, so the latency/speed is not as good as in a LAN) and started Tomcat. Then, on two machines I opened the drawboard example and drew something on it so that the PNG images gets big (about 500 KB). Then on both machines I simultaneously pressed F5 (either holding it down for some seconds, or press it manually when Firefox was in the middle of receiving the PNG image). After some time where I stopped, the drawboard mentioned 3 connected players instead of 2. Then I closed Firefox on machine A - it reported 2 players. I reopened firefox - 3 players. Then I closed Firefox on machine B - still 2 players. I reopened Firefox on machine B - then it tried to establish a new websocket connection (the .xhtml page was probably loaded from the cache), but after 5 seconds, it displayed "Websocket closed" so it couldn't establish a new connection - at the same time on the other machine the player count went down to 1. Then, on machine B I pressed F5 again, but now Firefox couldn't even load the .xhtml page, and on Tomcat the NPE showed up again: 10-Oct-2013 15:05:49.249 SEVERE [http-nio-8783-ClientPoller-0] org.apache.tomcat.util.net.NioEndpoint.processSocket Error allocating socket processor java.lang.NullPointerException at org.apache.tomcat.util.net.NioEndpoint.processSocket(NioEndpoint.java:624) at org.apache.tomcat.util.net.NioEndpoint$Poller.processKey(NioEndpoint.java:1163) at org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:1121) at java.lang.Thread.run(Thread.java:724) (and as I'm writing this, Firefox still seems to wait for a reply from Tomcat. After that I have pressed ESC to abort loading and pressed F5 again, but still no new websocket connection. Then I took my TCP forwarder tool to see what data is actually sent on the TCP connections from and to Tomcat. This is what happened: 1) Firefox opened Connection 1 and sent "GET /examples/websocket/drawboard.xhtml HTTP/1.1" request to Tomcat. 2) On Connection 1, Tomcat replied with a correct reply with the contents of the drawboard.xhtml file. 3) On Connection 1, Firefox sent "GET /favicon.ico HTTP/1.1" request to Tomcat. 4) Firefox established two new TCP connections (3 and 4) to Tomcat. 5) On Connection 1, Tomcat replied with the correct contents of "favicon.ico". 6) On Connection 2, Firefox sends "GET /examples/websocket/drawboard HTTP/1.1" request to Tomcat with WebSocket headers to open the WebSocket connection. 7) Nothing happens. 8) After some time Firefox half-closed connections 1 and 3, and Tomcat full-closed them. 9) I shutdown Firefox so connection 2 was half-closed by the Client, but Tomcat did not full-close it so it is still active on the TCP forwarder. Then I killed the TCP forwarder and opened it and Firefox again, but this time Tomcat even did not response on the "GET /examples/websocket/drawboard.xhtml HTTP/1.1" request. After I closed Firefox, then again the connection where that request was sent was still hold open by Tomcat. After some minutes, the forwarder received a Timeout error on the TCP connection that was still held open by Tomcat (SocketError: TimedOut (10060)). Hope this helps, Regards, Konstantin Preißer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1530975 - in /tomcat/trunk: java/org/apache/jasper/JspC.java webapps/docs/changelog.xml
Author: markt Date: Thu Oct 10 13:38:20 2013 New Revision: 1530975 URL: http://svn.apache.org/r1530975 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55251 Do not allow JspC task to fail silently if the web.xml or web.xml fragment can not be generated. Modified: tomcat/trunk/java/org/apache/jasper/JspC.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/jasper/JspC.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/JspC.java?rev=1530975&r1=1530974&r2=1530975&view=diff == --- tomcat/trunk/java/org/apache/jasper/JspC.java (original) +++ tomcat/trunk/java/org/apache/jasper/JspC.java Thu Oct 10 13:38:20 2013 @@ -1374,7 +1374,7 @@ public class JspC extends Task implement } } -protected void initWebXml() { +protected void initWebXml() throws JasperException { try { if (webxmlLevel >= INC_WEBXML) { mapout = openWebxmlWriter(new File(webxmlFile)); @@ -1396,6 +1396,7 @@ public class JspC extends Task implement mapout = null; servletout = null; mappingout = null; +throw new JasperException(ioe); } } Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1530975&r1=1530974&r2=1530975&view=diff == --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Thu Oct 10 13:38:20 2013 @@ -230,6 +230,10 @@ Servlet container itself. The scan is now performed only once rather than in two passes reducing startup time. (jboynes) + +55251: Do not allow JspC task to fail silently if the web.xml +or web.xml fragment can not be generated. (markt) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55251] JspC fails silently if directory for generated web.xml does not exist
https://issues.apache.org/bugzilla/show_bug.cgi?id=55251 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #1 from Mark Thomas --- This has been fixed in 8.0.x and will be included in 8.0.0-RC4 onwards. -- 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: r1530971 - in /tomcat/trunk/java/org/apache: jasper/JspC.java jasper/servlet/TldScanner.java tomcat/util/descriptor/tld/TldParser.java
Author: markt Date: Thu Oct 10 13:29:13 2013 New Revision: 1530971 URL: http://svn.apache.org/r1530971 Log: Fix TLD processing when using JspC. Modified: tomcat/trunk/java/org/apache/jasper/JspC.java tomcat/trunk/java/org/apache/jasper/servlet/TldScanner.java tomcat/trunk/java/org/apache/tomcat/util/descriptor/tld/TldParser.java Modified: tomcat/trunk/java/org/apache/jasper/JspC.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/JspC.java?rev=1530971&r1=1530970&r2=1530971&view=diff == --- tomcat/trunk/java/org/apache/jasper/JspC.java (original) +++ tomcat/trunk/java/org/apache/jasper/JspC.java Thu Oct 10 13:29:13 2013 @@ -1424,6 +1424,8 @@ public class JspC extends Task implement context = new JspCServletContext(log, resourceBase, classLoader); TldScanner scanner = new TldScanner(context, true, validateXml); +scanner.setClassLoader(classLoader); + try { scanner.scan(); } catch (SAXException e) { Modified: tomcat/trunk/java/org/apache/jasper/servlet/TldScanner.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/servlet/TldScanner.java?rev=1530971&r1=1530970&r2=1530971&view=diff == --- tomcat/trunk/java/org/apache/jasper/servlet/TldScanner.java (original) +++ tomcat/trunk/java/org/apache/jasper/servlet/TldScanner.java Thu Oct 10 13:29:13 2013 @@ -115,6 +115,14 @@ public class TldScanner { } /** + * Set the class loader used by the digester to create objects as a result + * of this scan. Normally this only needs tobe set when using JspC. + */ +public void setClassLoader(ClassLoader classLoader) { +tldParser.setClassLoader(classLoader); +} + +/** * Scan for TLDs required by the platform specification. */ protected void scanPlatform() { Modified: tomcat/trunk/java/org/apache/tomcat/util/descriptor/tld/TldParser.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/descriptor/tld/TldParser.java?rev=1530971&r1=1530970&r2=1530971&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/descriptor/tld/TldParser.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/descriptor/tld/TldParser.java Thu Oct 10 13:29:13 2013 @@ -62,4 +62,8 @@ public class TldParser { digester.reset(); } } + +public void setClassLoader(ClassLoader classLoader) { +digester.setClassLoader(classLoader); +} } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Tomcat Native 1.1.29
> The Apache Tomcat Native 1.1.29 is > [X] Stable, go ahead and release > Works for me, tested on Mint 15, 64bits, with Tomcat 7.0.42
[VOTE] Release Apache Tomcat Native 1.1.29
Version 1.1.29 is bug fixing release. The proposed release artefacts can be found at [1], and the build was done using tag [2]. The VOTE will remain open for at least 48 hours. The Apache Tomcat Native 1.1.29 is [ ] Stable, go ahead and release [ ] Broken because of ... [1] http://people.apache.org/~mturk/native/1.1.29 [2] https://svn.apache.org/repos/asf/tomcat/native/tags/TOMCAT_NATIVE_1_1_29 Regards -- ^TM - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Need tomcat-native 1.1.29 for next 8.0.x/7.0.x releases
Cool! On Oct 10, 2013, at 2:52 AM, Mladen Turk wrote: > On 10/09/2013 04:42 PM, Mark Thomas wrote: >> On 05/10/2013 23:39, Mark Thomas wrote: >>> Sorry to be a pain. The JSR 356 WebSocket implementation is broken with >>> APR prior to r1525525 [1]. Tomcat 7.0.x and Tomcat 8.0.x need a 1.1.29 >>> native release to pick up this fix. Any takers for the release? >> >> Ping. 8.0.x looks to be ready for the next RC but it is blocked waiting >> on a 1.1.29 release. >> > > I'll start the RM today. > > Regards > -- > ^TM > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1530944 - /tomcat/native/tags/TOMCAT_NATIVE_1_1_29/
Author: mturk Date: Thu Oct 10 12:37:51 2013 New Revision: 1530944 URL: http://svn.apache.org/r1530944 Log: Tag 1.1.29 Added: tomcat/native/tags/TOMCAT_NATIVE_1_1_29/ (props changed) - copied from r1530943, tomcat/native/branches/1.1.x/ Propchange: tomcat/native/tags/TOMCAT_NATIVE_1_1_29/ -- --- svn:ignore (added) +++ svn:ignore Thu Oct 10 12:37:51 2013 @@ -0,0 +1 @@ +dist Propchange: tomcat/native/tags/TOMCAT_NATIVE_1_1_29/ -- --- svn:mergeinfo (added) +++ svn:mergeinfo Thu Oct 10 12:37:51 2013 @@ -0,0 +1,3 @@ +/tomcat/native/trunk:815411,1342003,1342008,1342013,1342020,1342024,1394258,1394342,1424947,1424971,1430753,1437081,1438342,1439337,1441884,1441886,1442579,1442581,1445972,1507113 +/tomcat/tc7.0.x/trunk:1199985,1200164,1349932,1434887,1435769 +/tomcat/trunk:815418,832198,1001939,1033916,1043103,1044729,1078522,1145209,1145285,1149092,1241356,1241406-1241407,1242254,1292671,1299980,1300102,1434905,1437083 - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55508] TldLocationsCache not recognising custom TLDs in WEB-INF/lib
https://issues.apache.org/bugzilla/show_bug.cgi?id=55508 Mark Thomas changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |INVALID --- Comment #6 from Mark Thomas --- I've restored the Tomcat 7 behavior in Tomcat 8. My reading of the spec is TLDs should not be scanned if they are in WEB-INF/[classes|lib] but I appreciate it could be read either way. If this turns out to be an issue (unlikely given the amount of time 7.0.x has enforced this) then we can always make it optional. -- 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: r1530937 - /tomcat/trunk/java/org/apache/jasper/servlet/TldScanner.java
Author: markt Date: Thu Oct 10 12:28:57 2013 New Revision: 1530937 URL: http://svn.apache.org/r1530937 Log: Restore Tomcat 7 behaviour of skipping TLDs located directly in WEB-INF/classes or WEB-INF/lib Modified: tomcat/trunk/java/org/apache/jasper/servlet/TldScanner.java Modified: tomcat/trunk/java/org/apache/jasper/servlet/TldScanner.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/servlet/TldScanner.java?rev=1530937&r1=1530936&r2=1530937&view=diff == --- tomcat/trunk/java/org/apache/jasper/servlet/TldScanner.java (original) +++ tomcat/trunk/java/org/apache/jasper/servlet/TldScanner.java Thu Oct 10 12:28:57 2013 @@ -185,7 +185,11 @@ public class TldScanner { Set dirList = context.getResourcePaths(startPath); if (dirList != null) { for (String path : dirList) { -if (path.endsWith("/")) { +if (path.startsWith("/WEB-INF/classes/")) { +// Skip: JSP.7.3.1 +} else if (path.startsWith("/WEB-INF/lib/")) { +// Skip: JSP.7.3.1 +} else if (path.endsWith("/")) { scanResourcePaths(path); } else if (path.startsWith("/WEB-INF/tags/")) { // JSP 7.3.1: in /WEB-INF/tags only consider implicit.tld - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot success in ASF Buildbot on tomcat-trunk
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/5087 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1530909 Blamelist: violetagg Build succeeded! sincerely, -The Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Updated] (MTOMCAT-176) Make deploy/redeploy (upload) less verbose for --batch-mode / --quiet
[ https://issues.apache.org/jira/browse/MTOMCAT-176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Denis Yudin updated MTOMCAT-176: Attachment: MTOMCAT-176__Do_not_show_transfer_progress_when_Maven_is_running_in_batch_mode.patch Fixed by dependency injection of Settings into Mojo and then parametrizing the RequestEntityImplementation. Result: adding -B removes upload progress from the log > Make deploy/redeploy (upload) less verbose for --batch-mode / --quiet > - > > Key: MTOMCAT-176 > URL: https://issues.apache.org/jira/browse/MTOMCAT-176 > Project: Apache Tomcat Maven Plugin > Issue Type: Wish > Components: commons-lib >Affects Versions: 2.0 >Reporter: Thomas GL >Assignee: Olivier Lamy (*$^¨%`£) >Priority: Minor > Attachments: > MTOMCAT-176__Do_not_show_transfer_progress_when_Maven_is_running_in_batch_mode.patch > > > Hi, > Using maven-tomcat-plugin:2.0 for integration testing deployments results in > some Jenkins job logs where 99% of the lines comes from the upload "progress > meter" (implemented in > "TomcatManager.RequestEntityImplementation.transferProgressed"). > In some other plugins with similar HTTP activity, this kind of output can be > turned off by launching Maven with "-B/--batch-mode" (and probably "--quiet" > too, although I never do that). This seems to be standard behavior for > plugins which uses Wagon or Aether. Would it be possible to implement a > similar behavior in the maven-tomcat-plugin? > Actually, I gave it a try today, but I couldn't find how to get the Maven > batch/quiet options through the plugin API. My other attempt was to reuse > the Wagon "TransferListener" instance (the implementation, which can be a > verbose or quiet progress meter, seems to be chosen depending on the Maven > CLI option), but I couldn't find a path to there neither. But it's my first > time in some Maven code, I probably have missed something. > Sure, if it's actually not possible to implement a quiet mode based on the > Maven CLI options, then an alternative would be to add a plugin-specific > parameter. But I think it would be a bit less convenient. -- This message was sent by Atlassian JIRA (v6.1#6144) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1530918 - /tomcat/trunk/webapps/docs/changelog.xml
Author: markt Date: Thu Oct 10 11:07:48 2013 New Revision: 1530918 URL: http://svn.apache.org/r1530918 Log: Update the change log. Modified: tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1530918&r1=1530917&r2=1530918&view=diff == --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Thu Oct 10 11:07:48 2013 @@ -175,7 +175,10 @@ 55620: Enable Tomcat to start when either $CATALINA_HOME -and/or $CATALINA_BASE contains a comma character. (markt) +and/or $CATALINA_BASE contains a comma character. Prevent Tomcat from +starting when $CATALINA_HOME and/or $CATALINA_BASE contains a semi-colon +on Windows. Prevent Tomcat from starting when $CATALINA_HOME and/or +$CATALINA_BASE contains a colon on Linux/FreeBSD/etc. (markt) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55620] When using startup.bat if apache-tomcat-7.0.xx is in directory with "," (comma) or ";" (semi-colon) Tomcat fails to start
https://issues.apache.org/bugzilla/show_bug.cgi?id=55620 Mark Thomas changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |WONTFIX --- Comment #6 from Mark Thomas --- Checks added. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot failure in ASF Buildbot on tomcat-trunk
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/5086 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1530890 Blamelist: markt BUILD FAILED: failed compile_1 sincerely, -The Buildbot
svn commit: r1530916 - /tomcat/trunk/bin/catalina.sh
Author: markt Date: Thu Oct 10 11:04:41 2013 New Revision: 1530916 URL: http://svn.apache.org/r1530916 Log: Partial fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=55620 Prevent Tomcat from starting on Linux when CATALINA_HOME or CATALINA_BASE contains a colon Modified: tomcat/trunk/bin/catalina.sh Modified: tomcat/trunk/bin/catalina.sh URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/catalina.sh?rev=1530916&r1=1530915&r2=1530916&view=diff == --- tomcat/trunk/bin/catalina.sh (original) +++ tomcat/trunk/bin/catalina.sh Thu Oct 10 11:04:41 2013 @@ -129,6 +129,20 @@ PRGDIR=`dirname "$PRG"` # Copy CATALINA_BASE from CATALINA_HOME if not already set [ -z "$CATALINA_BASE" ] && CATALINA_BASE="$CATALINA_HOME" +# Ensure that neither CATALINA_HOME nor CATALINA_BASE contains a colon +# as this is used as the separator in the classpath and Java provides no +# mechanism for escaping if the same character appears in the path. +case $CATALINA_HOME in + *:*) echo "Using CATALINA_HOME: $CATALINA_HOME"; + echo "Unable to start as CATALINA_HOME contains a colon (:) character"; + exit 1; +esac +case $CATALINA_BASE in + *:*) echo "Using CATALINA_BASE: $CATALINA_BASE"; + echo "Unable to start as CATALINA_BASE contains a colon (:) character"; + exit 1; +esac + # Ensure that any user defined CLASSPATH variables are not used on startup, # but allow them to be specified in setenv.sh, in rare case when it is needed. CLASSPATH= - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1530910 - in /tomcat/tc7.0.x/trunk: ./ webapps/docs/appdev/deployment.xml
Author: violetagg Date: Thu Oct 10 10:24:44 2013 New Revision: 1530910 URL: http://svn.apache.org/r1530910 Log: Merged revision 1530909 from tomcat/trunk: The link to the Manager App How To was missing. Issue was reported via o.a.comments. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/webapps/docs/appdev/deployment.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1530909 Modified: tomcat/tc7.0.x/trunk/webapps/docs/appdev/deployment.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/appdev/deployment.xml?rev=1530910&r1=1530909&r2=1530910&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/appdev/deployment.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/appdev/deployment.xml Thu Oct 10 10:24:44 2013 @@ -224,7 +224,7 @@ approaches: web applications. Tomcat includes a web application, deployed by default on context path /manager, that allows you to deploy and undeploy applications on a running Tomcat server without -restarting it. See the administrator documentation (TODO: hyperlink) +restarting it. See Manager App HOW-TO for more information on using the Manager web application. Use "Manager" Ant Tasks In Your Build Script. Tomcat includes a set of custom task definitions for the Ant - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1530909 - /tomcat/trunk/webapps/docs/appdev/deployment.xml
Author: violetagg Date: Thu Oct 10 10:22:32 2013 New Revision: 1530909 URL: http://svn.apache.org/r1530909 Log: The link to the Manager App How To was missing. Issue was reported via o.a.comments. Modified: tomcat/trunk/webapps/docs/appdev/deployment.xml Modified: tomcat/trunk/webapps/docs/appdev/deployment.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/appdev/deployment.xml?rev=1530909&r1=1530908&r2=1530909&view=diff == --- tomcat/trunk/webapps/docs/appdev/deployment.xml (original) +++ tomcat/trunk/webapps/docs/appdev/deployment.xml Thu Oct 10 10:22:32 2013 @@ -222,7 +222,7 @@ approaches: web applications. Tomcat includes a web application, deployed by default on context path /manager, that allows you to deploy and undeploy applications on a running Tomcat server without -restarting it. See the administrator documentation (TODO: hyperlink) +restarting it. See Manager App HOW-TO for more information on using the Manager web application. Use "Manager" Ant Tasks In Your Build Script. Tomcat includes a set of custom task definitions for the Ant - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1530906 - /tomcat/native/branches/1.1.x/java/org/apache/tomcat/
Author: mturk Date: Thu Oct 10 10:10:22 2013 New Revision: 1530906 URL: http://svn.apache.org/r1530906 Log: Sync svn externals Modified: tomcat/native/branches/1.1.x/java/org/apache/tomcat/ (props changed) Propchange: tomcat/native/branches/1.1.x/java/org/apache/tomcat/ -- --- svn:externals (original) +++ svn:externals Thu Oct 10 10:10:22 2013 @@ -1 +1 @@ -^/tomcat/trunk/java/org/apache/tomcat/jni@1456474 jni +^/tomcat/trunk/java/org/apache/tomcat/jni@1528407 jni - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 53281] Tomcat returns garbage data with HTTP/0.9 200 OK header when SSL port is accessed using http
https://issues.apache.org/bugzilla/show_bug.cgi?id=53281 --- Comment #17 from saurabh --- (In reply to Konstantin Preißer from comment #14) > (In reply to saurabh from comment #12) > > Created attachment 30912 [details] > > HTTP 0.9 response from the server > > > > I tried the identical steps that have been provided and the browser receives > > garbage value with HTTP/0.9 response. I've attached the Live HTTP headers > > capture of the same. > > Just because some Browser Add-on reports a "HTTP/0.9 200 OK" response it > doesn't necessarily mean that this is what Tomcat is actually sending > (otherwise you should have seen that response when you are connecting with > telnet. > > My guess would be that the add-on (or even the browser) is trying to > interpret SSL bytes as plain HTTP response, and because it fails, displayes > some "HTTP/0.9" response. > > I verified this by setting up Tomcat 6.0.37 with a SSL connector using JSSE, > and downloadeding the Live HTTP headers addon for Firefox. I use a tool to > intercept the TCP connections and record the exact data packets that were > sent. > > I then opened the URL "http://localhost:8443/"; with Firefox. This is what > was sent from Firefox to Tomcat (309 bytes): > > 47 45 54 20 2F 20 48 54 54 50 2F 31 2E 31 0D 0A GET / HTTP/1.1.. > 48 6F 73 74 3A 20 6C 6F 63 61 6C 68 6F 73 74 3A Host: localhost: > 38 34 34 33 0D 0A 55 73 65 72 2D 41 67 65 6E 74 8443..User-Agent > 3A 20 4D 6F 7A 69 6C 6C 61 2F 35 2E 30 20 28 57 : Mozilla/5.0 (W > 69 6E 64 6F 77 73 20 4E 54 20 36 2E 33 3B 20 57 indows NT 6.3; W > 4F 57 36 34 3B 20 72 76 3A 32 34 2E 30 29 20 47 OW64; rv:24.0) G > 65 63 6B 6F 2F 32 30 31 30 30 31 30 31 20 46 69 ecko/20100101 Fi > 72 65 66 6F 78 2F 32 34 2E 30 0D 0A 41 63 63 65 refox/24.0..Acce > 70 74 3A 20 74 65 78 74 2F 68 74 6D 6C 2C 61 70 pt: text/html,ap > 70 6C 69 63 61 74 69 6F 6E 2F 78 68 74 6D 6C 2B plication/xhtml+ > 78 6D 6C 2C 61 70 70 6C 69 63 61 74 69 6F 6E 2F xml,application/ > 78 6D 6C 3B 71 3D 30 2E 39 2C 2A 2F 2A 3B 71 3D xml;q=0.9,*/*;q= > 30 2E 38 0D 0A 41 63 63 65 70 74 2D 4C 61 6E 67 0.8..Accept-Lang > 75 61 67 65 3A 20 64 65 2D 64 65 2C 64 65 3B 71 uage: de-de,de;q > 3D 30 2E 38 2C 65 6E 2D 75 73 3B 71 3D 30 2E 35 =0.8,en-us;q=0.5 > 2C 65 6E 3B 71 3D 30 2E 33 0D 0A 41 63 63 65 70 ,en;q=0.3..Accep > 74 2D 45 6E 63 6F 64 69 6E 67 3A 20 67 7A 69 70 t-Encoding: gzip > 2C 20 64 65 66 6C 61 74 65 0D 0A 43 6F 6E 6E 65 , deflate..Conne > 63 74 69 6F 6E 3A 20 6B 65 65 70 2D 61 6C 69 76 ction: keep-aliv > 65 0D 0A 0D 0Ae > > > This is what Tomcat responded (7 bytes): > 15 03 01 00 02 02 0A ... > (Connection closed) > > > This is what Live HTTP headers reported: > > http://localhost:8443/ > > GET / HTTP/1.1 > Host: localhost:8443 > User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 > Firefox/24.0 > Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 > Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3 > Accept-Encoding: gzip, deflate > Connection: keep-alive > > HTTP/0.9 200 OK > -- > > > As you can see, Tomcat didn't returin anything like "HTTP/0.9 200 OK" plain > text in its SSL response although Live HTTP Headers reports this. Instead it > sends some some SSL reply (though I do not have examined what kind of reply > it is), since actually you are sending some garbage to a SSL connector here. > > If Tomcat could be enhanced to recognize a erroneously sent plain HTTP > request to a HTTPS/SSL connector (like HTTPD does) is another question. I tried to figure out the SSL bytes --> 15 03 01 00 02 02 0A using the following link: http://pic.dhe.ibm.com/infocenter/tpfhelp/current/index.jsp?topic=%2Fcom.ibm.ztpf-ztpfdf.doc_put.cur%2Fgtps5%2Fs5rcd.html This is what I think those bytes mean: 0x15 --> SSL3_RT_ALERT 0x03 0x01 --> TLS1_VERSION 0x00 0x02 --> Length of data in the record (excluding the header itself) 0x02 --> SSL3_MT_SERVER_HELLO or SSL3_AL_FATAL 0x0A --> SSL3_AD_UNEXPECTED_MESSAGE -- 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: r1530898 - in /tomcat/native/branches/1.1.x: build.properties.default build.xml native/include/tcn_version.h
Author: mturk Date: Thu Oct 10 09:36:13 2013 New Revision: 1530898 URL: http://svn.apache.org/r1530898 Log: Prepare versions for tag Modified: tomcat/native/branches/1.1.x/build.properties.default tomcat/native/branches/1.1.x/build.xml tomcat/native/branches/1.1.x/native/include/tcn_version.h Modified: tomcat/native/branches/1.1.x/build.properties.default URL: http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/build.properties.default?rev=1530898&r1=1530897&r2=1530898&view=diff == --- tomcat/native/branches/1.1.x/build.properties.default (original) +++ tomcat/native/branches/1.1.x/build.properties.default Thu Oct 10 09:36:13 2013 @@ -20,8 +20,8 @@ version.major=1 version.minor=1 version.build=29 version.patch=0 -version.suffix=-dev -#version.suffix= +#version.suffix=-dev +version.suffix= # - Default Base Path for Dependent Packages - # Please note this path must be absolute, not relative, Modified: tomcat/native/branches/1.1.x/build.xml URL: http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/build.xml?rev=1530898&r1=1530897&r2=1530898&view=diff == --- tomcat/native/branches/1.1.x/build.xml (original) +++ tomcat/native/branches/1.1.x/build.xml Thu Oct 10 09:36:13 2013 @@ -35,7 +35,7 @@ - + Modified: tomcat/native/branches/1.1.x/native/include/tcn_version.h URL: http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/native/include/tcn_version.h?rev=1530898&r1=1530897&r2=1530898&view=diff == --- tomcat/native/branches/1.1.x/native/include/tcn_version.h (original) +++ tomcat/native/branches/1.1.x/native/include/tcn_version.h Thu Oct 10 09:36:13 2013 @@ -75,7 +75,7 @@ extern "C" { * This symbol is defined for internal, "development" copies of TCN. This * symbol will be #undef'd for releases. */ -#define TCN_IS_DEV_VERSION 1 +#define TCN_IS_DEV_VERSION 0 /** The formatted string of APU's version */ - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1530890 - /tomcat/trunk/bin/catalina.bat
Author: markt Date: Thu Oct 10 09:17:24 2013 New Revision: 1530890 URL: http://svn.apache.org/r1530890 Log: Partial fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=55620 Prevent Tomcat from starting on Windows when CATALINA_HOME contains a ; character Modified: tomcat/trunk/bin/catalina.bat Modified: tomcat/trunk/bin/catalina.bat URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/catalina.bat?rev=1530890&r1=1530889&r2=1530890&view=diff == --- tomcat/trunk/bin/catalina.bat (original) +++ tomcat/trunk/bin/catalina.bat Thu Oct 10 09:17:24 2013 @@ -132,6 +132,23 @@ if not "%CATALINA_BASE%" == "" goto gotB set "CATALINA_BASE=%CATALINA_HOME%" :gotBase +rem Ensure that neither CATALINA_HOME nor CATALINA_BASE contains a semi-colon +rem as this is used as the separator in the classpath and Java provides no +rem mechanism for escaping if the same character appears in the path. Check this +rem by replacing all occurrences of ';' with '' and checking that neither +rem CATALINA_HOME nor CATALINA_BASE have changed +if "%CATALINA_HOME%" == "%CATALINA_HOME:;=%" goto homeNoSemicolon +echo Using CATALINA_HOME: "%CATALINA_HOME%" +echo Unable to start as CATALINA_HOME contains a semicolon (;) character +goto end +:homeNoSemicolon + +if "%CATALINA_BASE%" == "%CATALINA_BASE:;=%" goto baseNoSemicolon +echo Using CATALINA_BASE: "%CATALINA_BASE%" +echo Unable to start as CATALINA_HOME contains a semicolon (;) character +goto end +:baseNoSemicolon + rem Ensure that any user defined CLASSPATH variables are not used on startup, rem but allow them to be specified in setenv.bat, in rare case when it is needed. set CLASSPATH= - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1530884 - in /tomcat/tc7.0.x/trunk: ./ webapps/docs/appdev/deployment.xml webapps/docs/changelog.xml
Author: violetagg Date: Thu Oct 10 09:07:18 2013 New Revision: 1530884 URL: http://svn.apache.org/r1530884 Log: Merged revision 1530875 from tomcat/trunk: The link under Tomcat Context Descriptor section should point to documentation about context.xml and not the one for server.xml. Issue is reported via o.a.comments. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/webapps/docs/appdev/deployment.xml tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1530875 Modified: tomcat/tc7.0.x/trunk/webapps/docs/appdev/deployment.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/appdev/deployment.xml?rev=1530884&r1=1530883&r2=1530884&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/appdev/deployment.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/appdev/deployment.xml Thu Oct 10 09:07:18 2013 @@ -178,7 +178,7 @@ configuration options, such as an access configuration and more. This XML file must contain one Context element, which will be considered as if it was the child of the Host element corresponding to the Host to which the web application is being deployed. The -Tomcat configuration documentation contains +Tomcat configuration documentation contains information on the Context element. Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1530884&r1=1530883&r2=1530884&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Thu Oct 10 09:07:18 2013 @@ -135,6 +135,10 @@ initialization of the servlet org.apache.catalina.manager.StatusManagerServlet is removed in the destroy phase. (violetagg) + +Correct the documentation for Deployment Organization in the App Dev +Guide. (violetagg) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1530881 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java
Author: markt Date: Thu Oct 10 08:54:04 2013 New Revision: 1530881 URL: http://svn.apache.org/r1530881 Log: Avoid stacktrace in logs if the session closes due to an IO error in the middle of sending a partial message. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1530866 Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java?rev=1530881&r1=1530880&r2=1530881&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java Thu Oct 10 08:54:04 2013 @@ -281,7 +281,11 @@ public abstract class WsRemoteEndpointIm MessagePart mpNext = messagePartQueue.poll(); if (mpNext == null) { messagePartInProgress = false; -} else { +} else if (!closed){ +// Session may have been closed unexpectedly in the middle of +// sending a fragmented message closing the endpoint. If this +// happens, clearly there is no point trying to send the rest of +// the message. writeMessagePart(mpNext); } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1530081 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
On 10/10/2013 08:56, Mark Thomas wrote: > On 09/10/2013 22:48, Konstantin Preißer wrote: > >> Unfortunately, it seems there are some new problems when using the NIO >> connector :( > > Not unfortunate at all. This is all very useful feedback. > >> (though I do not think they affect a 8.0.0-RC4 release). >> I was testing the current trunk with NIO connector on Windows with 64-Bit >> Java and I tried to open the Drawboard example and there press F5 for >> several times on different computers. >> >> 1) Sometimes I get following exceptions: >> >> 09-Oct-2013 23:11:28.069 SEVERE [http-nio-8783-exec-8] >> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process Error >> reading request, ignored >> java.lang.IllegalStateException: Message will not be sent because the >> WebSocket session has been closed >> at >> org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:292) > > Fixed (purely on code inspection - I haven't tested this yet). > >> 2) What is a bit more severe is that sometimes after pressing F5 a lot of >> times, Firefox cannot establish a Websocket connection or make another HTTP >> request to Tomcat. I can't reproduce this. It is possible that the fix for 1 also fixed this. Can you test? What I did see was that with a lot of refreshes, Firefox ended up with two connections open when it should only have had one. Closing the browser fixed that. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1530875 - /tomcat/trunk/webapps/docs/appdev/deployment.xml
Author: violetagg Date: Thu Oct 10 08:31:32 2013 New Revision: 1530875 URL: http://svn.apache.org/r1530875 Log: The link under Tomcat Context Descriptor section should point to documentation about context.xml and not the one for server.xml. Issue is reported via o.a.comments. Modified: tomcat/trunk/webapps/docs/appdev/deployment.xml Modified: tomcat/trunk/webapps/docs/appdev/deployment.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/appdev/deployment.xml?rev=1530875&r1=1530874&r2=1530875&view=diff == --- tomcat/trunk/webapps/docs/appdev/deployment.xml (original) +++ tomcat/trunk/webapps/docs/appdev/deployment.xml Thu Oct 10 08:31:32 2013 @@ -178,7 +178,7 @@ configuration options, such as an access configuration and more. This XML file must contain one Context element, which will be considered as if it was the child of the Host element corresponding to the Host to which the web application is being deployed. The -Tomcat configuration documentation contains +Tomcat configuration documentation contains information on the Context element. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1530081 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
On 09/10/2013 22:48, Konstantin Preißer wrote: > Unfortunately, it seems there are some new problems when using the NIO > connector :( Not unfortunate at all. This is all very useful feedback. > (though I do not think they affect a 8.0.0-RC4 release). > I was testing the current trunk with NIO connector on Windows with 64-Bit > Java and I tried to open the Drawboard example and there press F5 for several > times on different computers. > > 1) Sometimes I get following exceptions: > > 09-Oct-2013 23:11:28.069 SEVERE [http-nio-8783-exec-8] > org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process Error > reading request, ignored > java.lang.IllegalStateException: Message will not be sent because the > WebSocket session has been closed > at > org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:292) Fixed (purely on code inspection - I haven't tested this yet). > 2) What is a bit more severe is that sometimes after pressing F5 a lot of > times, Firefox cannot establish a Websocket connection or make another HTTP > request to Tomcat. That sounds like Firefox has reached its per server connection limit which suggests Tomcat isn't closing connections properly on some error condition(s). > Then I also get such exceptions sporadically: > > 09-Oct-2013 23:19:07.646 SEVERE [http-nio-8783-ClientPoller-0] > org.apache.tomcat.util.net.NioEndpoint.processSocket Error allocating socket > processor > java.lang.NullPointerException > at > org.apache.tomcat.util.net.NioEndpoint.processSocket(NioEndpoint.java:624) > at > org.apache.tomcat.util.net.NioEndpoint$Poller.processKey(NioEndpoint.java:1163) > at > org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:1121) > at java.lang.Thread.run(Thread.java:724) That looks like a closed socket hasn't been removed from the Poller. > or these (which seems strange because there occurs a Timeout exception when > sending data, but I don't think Firefox would leave the connection open and > stop to read from it): > 09-Oct-2013 23:14:57.453 SEVERE [http-nio-8783-exec-4] > websocket.drawboard.DrawboardEndpoint.onError onError: java.io.IOException: > java.util.concurrent.TimeoutException > java.io.IOException: java.util.concurrent.TimeoutException > at > org.apache.tomcat.websocket.WsRemoteEndpointImplBase.startMessageBlock(WsRemoteEndpointImplBase.java:226) > at > org.apache.tomcat.websocket.WsSession.sendCloseMessage(WsSession.java:474) > at org.apache.tomcat.websocket.WsSession.onClose(WsSession.java:438) > at > org.apache.tomcat.websocket.WsFrameBase.processDataControl(WsFrameBase.java:316) > at > org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:270) > at > org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:116) > at > org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:55) > at > org.apache.tomcat.websocket.server.WsHttpUpgradeHandler$WsReadListener.onDataAvailable(WsHttpUpgradeHandler.java:192) > at > org.apache.coyote.http11.upgrade.AbstractServletInputStream.onDataAvailable(AbstractServletInputStream.java:169) > at > org.apache.coyote.http11.upgrade.AbstractProcessor.upgradeDispatch(AbstractProcessor.java:95) > at > org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:640) > at > org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223) > at > org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1595) > at > org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1553) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > at java.lang.Thread.run(Thread.java:724) > Caused by: java.util.concurrent.TimeoutException > at > org.apache.tomcat.websocket.FutureToSendHandler.get(FutureToSendHandler.java:99) > at > org.apache.tomcat.websocket.WsRemoteEndpointImplBase.startMessageBlock(WsRemoteEndpointImplBase.java:222) > ... 16 more Hmm. That is timing out when trying to send a close message. Overall, it looks like the connection isn't always closed cleanly when F5 is pressed several times in quick succession. I'll take a look. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1530866 - /tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java
Author: markt Date: Thu Oct 10 07:42:37 2013 New Revision: 1530866 URL: http://svn.apache.org/r1530866 Log: Avoid stacktrace in logs if the session closes due to an IO error in the middle of sending a partial message. Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java?rev=1530866&r1=1530865&r2=1530866&view=diff == --- tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java Thu Oct 10 07:42:37 2013 @@ -275,7 +275,11 @@ public abstract class WsRemoteEndpointIm MessagePart mpNext = messagePartQueue.poll(); if (mpNext == null) { messagePartInProgress = false; -} else { +} else if (!closed){ +// Session may have been closed unexpectedly in the middle of +// sending a fragmented message closing the endpoint. If this +// happens, clearly there is no point trying to send the rest of +// the message. writeMessagePart(mpNext); } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Need tomcat-native 1.1.29 for next 8.0.x/7.0.x releases
On 10/10/2013 07:52, Mladen Turk wrote: > On 10/09/2013 04:42 PM, Mark Thomas wrote: >> On 05/10/2013 23:39, Mark Thomas wrote: >>> Sorry to be a pain. The JSR 356 WebSocket implementation is broken with >>> APR prior to r1525525 [1]. Tomcat 7.0.x and Tomcat 8.0.x need a 1.1.29 >>> native release to pick up this fix. Any takers for the release? >> >> Ping. 8.0.x looks to be ready for the next RC but it is blocked waiting >> on a 1.1.29 release. >> > > I'll start the RM today. Many thanks. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org