svn commit: r1485972 - /tomcat/trunk/java/org/apache/catalina/connector/Connector.java
Author: markt Date: Fri May 24 08:33:44 2013 New Revision: 1485972 URL: http://svn.apache.org/r1485972 Log: Trivial formatting Modified: tomcat/trunk/java/org/apache/catalina/connector/Connector.java Modified: tomcat/trunk/java/org/apache/catalina/connector/Connector.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Connector.java?rev=1485972&r1=1485971&r2=1485972&view=diff == --- tomcat/trunk/java/org/apache/catalina/connector/Connector.java (original) +++ tomcat/trunk/java/org/apache/catalina/connector/Connector.java Fri May 24 08:33:44 2013 @@ -98,7 +98,7 @@ public class Connector extends Lifecycle /** * Default timeout for asynchronous requests (ms). */ -protected long asyncTimeout =3; +protected long asyncTimeout = 3; /** - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1486056 - in /tomcat/trunk/java/org/apache/coyote/http11: AbstractInputBuffer.java InternalAprInputBuffer.java InternalNioInputBuffer.java
Author: markt Date: Fri May 24 14:00:29 2013 New Revision: 1486056 URL: http://svn.apache.org/r1486056 Log: Improve Javadoc Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java?rev=1486056&r1=1486055&r2=1486056&view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java Fri May 24 14:00:29 2013 @@ -232,6 +232,12 @@ public abstract class AbstractInputBuffe public abstract boolean parseHeaders() throws IOException; +/** + * Attempts to read some data into the input buffer. + * + * @return true if more data was added to the input buffer + * otherwise false + */ protected abstract boolean fill(boolean block) throws IOException; protected abstract void init(SocketWrapper socketWrapper, Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java?rev=1486056&r1=1486055&r2=1486056&view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java Fri May 24 14:00:29 2013 @@ -554,12 +554,6 @@ public class InternalAprInputBuffer exte } -/** - * Attempts to read some data into the input buffer. - * - * @return true if more data was added to the input buffer - * otherwise false - */ @Override protected boolean fill(boolean block) throws IOException { // Ignore the block parameter Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java?rev=1486056&r1=1486055&r2=1486056&view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java Fri May 24 14:00:29 2013 @@ -796,18 +796,14 @@ public class InternalNioInputBuffer exte } -/** - * Fill the internal buffer using data from the underlying input stream. - * - * @return false if at end of stream - */ @Override protected boolean fill(boolean block) throws IOException, EOFException { return fill(true,block); } -protected boolean fill(boolean timeout, boolean block) throws IOException, EOFException { +protected boolean fill(boolean timeout, boolean block) +throws IOException, EOFException { boolean read = false; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1486059 - /tomcat/trunk/java/org/apache/coyote/http11/filters/SavedRequestInputFilter.java
Author: markt Date: Fri May 24 14:06:40 2013 New Revision: 1486059 URL: http://svn.apache.org/r1486059 Log: Marginally more efficient Modified: tomcat/trunk/java/org/apache/coyote/http11/filters/SavedRequestInputFilter.java Modified: tomcat/trunk/java/org/apache/coyote/http11/filters/SavedRequestInputFilter.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/filters/SavedRequestInputFilter.java?rev=1486059&r1=1486058&r2=1486059&view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/filters/SavedRequestInputFilter.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/filters/SavedRequestInputFilter.java Fri May 24 14:06:40 2013 @@ -49,6 +49,9 @@ public class SavedRequestInputFilter imp @Override public int doRead(ByteChunk chunk, org.apache.coyote.Request request) throws IOException { +if(input.getOffset()>= input.getEnd()) +return -1; + int writeLength = 0; if (chunk.getLimit() > 0 && chunk.getLimit() < input.getLength()) { @@ -57,9 +60,6 @@ public class SavedRequestInputFilter imp writeLength = input.getLength(); } -if(input.getOffset()>= input.getEnd()) -return -1; - input.substract(chunk.getBuffer(), 0, writeLength); chunk.setOffset(0); chunk.setEnd(writeLength); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1486060 - in /tomcat/trunk/java/org/apache: catalina/connector/ coyote/ coyote/http11/ coyote/http11/filters/
Author: markt Date: Fri May 24 14:08:25 2013 New Revision: 1486060 URL: http://svn.apache.org/r1486060 Log: Implement new isFinished() method that identifies when a request body has been fully read. Required since available()==0 != isFinished() Modified: tomcat/trunk/java/org/apache/catalina/connector/Request.java tomcat/trunk/java/org/apache/coyote/ActionCode.java tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java tomcat/trunk/java/org/apache/coyote/http11/InputFilter.java tomcat/trunk/java/org/apache/coyote/http11/filters/BufferedInputFilter.java tomcat/trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java tomcat/trunk/java/org/apache/coyote/http11/filters/IdentityInputFilter.java tomcat/trunk/java/org/apache/coyote/http11/filters/SavedRequestInputFilter.java tomcat/trunk/java/org/apache/coyote/http11/filters/VoidInputFilter.java Modified: tomcat/trunk/java/org/apache/catalina/connector/Request.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Request.java?rev=1486060&r1=1486059&r2=1486060&view=diff == --- tomcat/trunk/java/org/apache/catalina/connector/Request.java (original) +++ tomcat/trunk/java/org/apache/catalina/connector/Request.java Fri May 24 14:08:25 2013 @@ -2443,6 +2443,18 @@ public class Request return (inputBuffer.available() > 0); } + +/** + * Return true if an attempt has been made to read the request body and all + * of the request body has been read + */ +public boolean isFinished() { +AtomicBoolean result = new AtomicBoolean(false); +coyoteRequest.action(ActionCode.REQUEST_BODY_FULLY_READ, result); +return result.get(); +} + + /** * Disable swallowing of remaining input if configured */ Modified: tomcat/trunk/java/org/apache/coyote/ActionCode.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ActionCode.java?rev=1486060&r1=1486059&r2=1486060&view=diff == --- tomcat/trunk/java/org/apache/coyote/ActionCode.java (original) +++ tomcat/trunk/java/org/apache/coyote/ActionCode.java Fri May 24 14:08:25 2013 @@ -210,5 +210,10 @@ public enum ActionCode { *Indicator that the Servlet is interested *in being notified when it can write data */ -NB_WRITE_INTEREST +NB_WRITE_INTEREST, + +/** + * Indicates if the request body has been fully read. + */ +REQUEST_BODY_FULLY_READ } Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java?rev=1486060&r1=1486059&r2=1486060&view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java Fri May 24 14:08:25 2013 @@ -822,6 +822,9 @@ public abstract class AbstractHttp11Proc httpUpgradeHandler = (HttpUpgradeHandler) param; // Stop further HTTP output getOutputBuffer().finished = true; +} else if (actionCode == ActionCode.REQUEST_BODY_FULLY_READ) { +AtomicBoolean result = (AtomicBoolean) param; +result.set(getInputBuffer().isFinished()); } else { actionInternal(actionCode, param); } Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java?rev=1486060&r1=1486059&r2=1486060&view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java Fri May 24 14:08:25 2013 @@ -344,6 +344,37 @@ public abstract class AbstractInputBuffe } +/** + * Has all of the request body been read? There are subtle differences + * between this and available() > 0 primarily because of having to handle + * faking non-blocking reads with the blocking IO connector. + */ +public boolean isFinished() { +if (lastValid > pos) { +// Data to read in the buffer so not finished +return false; +} + +/* + * Don't use fill(false) here because in the following circumstances + * BIO will block - possibly indefinitely + * - client is using keep-alive and connection is still open + * - client has sent the complete request + * - client has not sent any of the next request (i.e. no pipelining) +
svn commit: r1486061 - /tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
Author: markt Date: Fri May 24 14:09:27 2013 New Revision: 1486061 URL: http://svn.apache.org/r1486061 Log: Use new isFinished() method rather than available==0 Check if body has been read in non-blocking mode when exiting service method Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=1486061&r1=1486060&r2=1486061&view=diff == --- tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java (original) +++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Fri May 24 14:09:27 2013 @@ -21,6 +21,7 @@ import java.io.UnsupportedEncodingExcept import java.nio.charset.Charset; import java.util.EnumSet; +import javax.servlet.ReadListener; import javax.servlet.RequestDispatcher; import javax.servlet.SessionTrackingMode; import javax.servlet.http.HttpServletResponse; @@ -369,7 +370,7 @@ public class CoyoteAdapter implements Ad try { Thread.currentThread().setContextClassLoader(newCL); req.getReadListener().onDataAvailable(); -if (request.getInputStream().isFinished()) { +if (request.isFinished()) { req.getReadListener().onAllDataRead(); } } finally { @@ -515,6 +516,24 @@ public class CoyoteAdapter implements Ad AsyncContextImpl asyncConImpl = (AsyncContextImpl)request.getAsyncContext(); if (asyncConImpl != null) { async = true; +ReadListener readListener = +request.getCoyoteRequest().getReadListener(); +if (readListener != null) { +// Possible the all data may have been read during service() +// method so this needs to be checked here +ClassLoader oldCL = +Thread.currentThread().getContextClassLoader(); +ClassLoader newCL = +request.getContext().getLoader().getClassLoader(); +try { +Thread.currentThread().setContextClassLoader(newCL); +if (request.isFinished()) { +req.getReadListener().onAllDataRead(); +} +} finally { +Thread.currentThread().setContextClassLoader(oldCL); +} +} } else if (!comet) { request.finishRequest(); response.finishResponse(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1486062 - /tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java
Author: markt Date: Fri May 24 14:09:55 2013 New Revision: 1486062 URL: http://svn.apache.org/r1486062 Log: Add a test case for bug 54928 Modified: tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java Modified: tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java?rev=1486062&r1=1486061&r2=1486062&view=diff == --- tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java (original) +++ tomcat/trunk/test/org/apache/catalina/connector/TestCoyoteAdapter.java Fri May 24 14:09:55 2013 @@ -18,8 +18,10 @@ package org.apache.catalina.connector; import java.io.File; import java.io.IOException; +import java.io.OutputStream; import java.io.PrintWriter; +import javax.servlet.AsyncContext; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; @@ -29,8 +31,11 @@ import org.junit.Assert; import org.junit.Test; import org.apache.catalina.Context; +import org.apache.catalina.Wrapper; +import org.apache.catalina.startup.SimpleHttpClient; import org.apache.catalina.startup.Tomcat; import org.apache.catalina.startup.TomcatBaseTest; +import org.apache.tomcat.util.buf.B2CConverter; import org.apache.tomcat.util.buf.ByteChunk; public class TestCoyoteAdapter extends TomcatBaseTest { @@ -250,4 +255,94 @@ public class TestCoyoteAdapter extends T pathInfo = req.getPathInfo(); } } + + +@Test +public void testBug54928() throws Exception { +// Setup Tomcat instance +Tomcat tomcat = getTomcatInstance(); + +// Must have a real docBase - just use temp +Context ctx = +tomcat.addContext("/", System.getProperty("java.io.tmpdir")); + +AsyncServlet servlet = new AsyncServlet(); +Wrapper w = Tomcat.addServlet(ctx, "async", servlet); +w.setAsyncSupported(true); +ctx.addServletMapping("/async", "async"); + +tomcat.start(); + +SimpleHttpClient client = new SimpleHttpClient() { +@Override +public boolean isResponseBodyOK() { +return true; +} +}; + +String request = "GET /async HTTP/1.1" + SimpleHttpClient.CRLF + +"Host: a" + SimpleHttpClient.CRLF + SimpleHttpClient.CRLF; + +client.setPort(getPort()); +client.setRequest(new String[] {request}); + +client.connect(); +client.sendRequest(); + +for (int i = 0; i < 10; i++) { +System.out.println(client.readLine()); +} + +client.disconnect(); + +// Wait for server thread to stop +while (servlet.getThread().isAlive()) { +Thread.sleep(250); +} +} + +private static class AsyncServlet extends HttpServlet { + +private static final long serialVersionUID = 1L; + +// This is a hack that won't work generally as servlets are expected to +// handle more than one request. +private Thread t; + +public Thread getThread() { +return t; +} + +@Override +protected void doGet(HttpServletRequest req, HttpServletResponse resp) +throws ServletException, IOException { + +resp.setContentType("text/plain"); +resp.setCharacterEncoding("UTF-8"); + +final OutputStream os = resp.getOutputStream(); + +final AsyncContext asyncCtxt = req.startAsync(); +asyncCtxt.setTimeout(3000); + +t = new Thread(new Runnable() { + +@Override +public void run() { +while (true) { +try { +os.write("TEST".getBytes(B2CConverter.UTF_8)); +os.flush(); +Thread.sleep(1000); +} catch (Exception e) { +asyncCtxt.complete(); +break; +} +} +} +}); +t.setName("testBug54928"); +t.start(); +} +} } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1486064 - /tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java
Author: markt Date: Fri May 24 14:10:28 2013 New Revision: 1486064 URL: http://svn.apache.org/r1486064 Log: Modify test to check onAllDataRead() is called correctly Modified: tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java Modified: tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java?rev=1486064&r1=1486063&r2=1486064&view=diff == --- tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java (original) +++ tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java Fri May 24 14:10:28 2013 @@ -332,7 +332,8 @@ public class TestNonBlockingAPI extends } private class TestReadListener implements ReadListener { -AsyncContext ctx; +private final AsyncContext ctx; +private final StringBuilder body = new StringBuilder(); public TestReadListener(AsyncContext ctx) { this.ctx = ctx; @@ -353,23 +354,28 @@ public class TestNonBlockingAPI extends s += new String(b, 0, read); } while (in.isReady()); System.out.println(s); -if (s.endsWith("FINISHED")) { -ctx.complete(); -ctx.getResponse().getWriter().print("OK"); -} else { -in.isReady(); -} +body.append(s); } catch (Exception x) { x.printStackTrace(); ctx.complete(); } - } @Override public void onAllDataRead() { System.out.println("onAllDataRead"); - +String msg; +if (body.toString().endsWith("FINISHED")) { +msg = "OK"; +} else { +msg = "FAILED"; +} +try { +ctx.getResponse().getWriter().print(msg); +} catch (IOException ioe) { +// Ignore +} +ctx.complete(); } @Override - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Created] (MTOMCAT-224) Tomcat Maven Plugin is not marked @threadSafe
Diego Lemos created MTOMCAT-224: --- Summary: Tomcat Maven Plugin is not marked @threadSafe Key: MTOMCAT-224 URL: https://issues.apache.org/jira/browse/MTOMCAT-224 Project: Apache Tomcat Maven Plugin Issue Type: Improvement Components: tomcat6 Affects Versions: 2.1 Reporter: Diego Lemos Assignee: Olivier Lamy (*$^¨%`£) When tomcat6-maven-plugin is used in a parallel build, maven says that the plugin is not thread-safe : [WARNING] * [WARNING] * Your build is requesting parallel execution, but project * [WARNING] * contains the following plugin(s) that are not marked as * [WARNING] * @threadSafe to support parallel building. * [WARNING] * While this /may/ work fine, please look for plugin updates* [WARNING] * and/or request plugins be made thread-safe. * [WARNING] * If reporting an issue, report it against the plugin in* [WARNING] * question, not against maven-core * [WARNING] * [WARNING] The following plugins are not marked @threadSafe in #: [WARNING] org.apache.tomcat.maven:tomcat6-maven-plugin:2.1 [WARNING] * It will be nice to review the plugin to ensure that it is thread-safe and add a @threadSafe annotation to it. More details about the parallel builds: https://cwiki.apache.org/MAVEN/parallel-builds-in-maven-3.html -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55017] New: Ability to configure RMI bind address
https://issues.apache.org/bugzilla/show_bug.cgi?id=55017 Bug ID: 55017 Summary: Ability to configure RMI bind address Product: Tomcat 7 Version: trunk Hardware: PC OS: Linux Status: NEW Severity: enhancement Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: alexey.nos...@gmail.com Created attachment 30319 --> https://issues.apache.org/bugzilla/attachment.cgi?id=30319&action=edit Patch to provider bind rmi bind address setup ability There is a patch which adds rmiBindAddress property to JmxRemoteLifecycleListener, which allows to bind RMI server to specific interface instead of 0.0.0.0. It may useful for binding RMI to localhost and avoiding firewall configuration (and then monitoring through SSH tunnel). Unfortunatly using of rmiBindAddress incompatible with rmiSSL, but i think it's not an issue because of rarely intersecting use cases. -- 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
[Bug 55017] Ability to configure RMI bind address
https://issues.apache.org/bugzilla/show_bug.cgi?id=55017 Alexey Noskov changed: What|Removed |Added CC||alexey.nos...@gmail.com -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1486085 - /tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java
Author: markt Date: Fri May 24 14:59:45 2013 New Revision: 1486085 URL: http://svn.apache.org/r1486085 Log: Non-blocking ends when async ends so ensure listeners are cleared Modified: tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java Modified: tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java?rev=1486085&r1=1486084&r2=1486085&view=diff == --- tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java (original) +++ tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java Fri May 24 14:59:45 2013 @@ -236,6 +236,7 @@ public class AsyncStateMachine { state == AsyncState.ERROR) { state = AsyncState.MUST_COMPLETE; } else if (state == AsyncState.READ_WRITE_OP) { +clearNonBlockingListeners(); state = AsyncState.MUST_COMPLETE; } else { throw new IllegalStateException( @@ -297,6 +298,7 @@ public class AsyncStateMachine { if (state == AsyncState.DISPATCHED || state == AsyncState.TIMING_OUT || state == AsyncState.READ_WRITE_OP) { +clearNonBlockingListeners(); state = AsyncState.ERROR; } else { throw new IllegalStateException( @@ -351,6 +353,12 @@ public class AsyncStateMachine { } +private void clearNonBlockingListeners() { +processor.getRequest().listener = null; +processor.getRequest().getResponse().listener = null; +} + + private static class PrivilegedSetTccl implements PrivilegedAction { private ClassLoader cl; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
mod_jk AM_MAINTAINER_MODE nightmares
Folks, it is abusive to force all builds of mod_jk to invoke the whole automake toolchain; it isn't practical to expect automake to work on all platforms which mod_jk is happy to compile under. Even the root of automake, m4 itself, is often flakey under some of these OS distributions. Automake offers a flag, but we've failed to give the user that choice. As the AC maintainer-mode flag is not built into the mod_jk ./configure it is IMPOSSIBLE to turn off without either 1. hacking ./configure or 2. hacking the Makefile. Hacks really shouldn't be required, we would like people to use our files and know what their machine had chosen to do. I would strongly encourage us never to ship the jk connector pkg with maintainer mode enabled by default. It causes the user to run with different ./configure script than the project tested when the release vote happened. But in any case we need to support the flag to allow users to explicitly enable or disable the AM rebuild. I'm happy to commit a change but please vote for your preferred behavior in svn, since it is a contentious choice (simply google for AM_MAINTAINER_MODE for a host of debates on the topic); [ ] AM_MAINTAINER_MODE([enable]) [default to re-automake] [ ] AM_MAINTAINER_MODE([disable]) [default to not re-automake] [ ] no AM_MAINTAINER_MODE macro [status quo, no choices] [An additional option would be to have the jkrelease script munge AM_MAINTAINER_MODE([enable]) into AM_MAINTAINER_MODE([disable]) at release tarball time before invoking automake, but that would take someone more familiar with jkrelease, such as a recent RM, to verify that the entire process is behaving correctly.] Additionally, we overload the maintainer-mode with -DDEBUG/-Wall. That probably should change. Although that is httpd's definition of maintainer-mode, httpd is not an automake project (for many well thought-out reasons). The incidental decision to be made is; [ ] Overload --enable-maintainer-mode [status quo] [ ] Rename jk's -DDEBUG -Wall flag to --enable-debugging-mode Note that flags come 'for free' if building mod_jk against an httpd ./configure[d] --enable-maintainer-mode - no jk option required. But that doesn't solve the flags for non-httpd based jk connectors. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1486134 - in /tomcat/trunk: java/org/apache/catalina/connector/Request.java test/org/apache/catalina/connector/TestRequest.java
Author: violetagg Date: Fri May 24 17:46:27 2013 New Revision: 1486134 URL: http://svn.apache.org/r1486134 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54984 Ensure that the correct encoding will be used when processing the multipart data. Modified: tomcat/trunk/java/org/apache/catalina/connector/Request.java tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java Modified: tomcat/trunk/java/org/apache/catalina/connector/Request.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Request.java?rev=1486134&r1=1486133&r2=1486134&view=diff == --- tomcat/trunk/java/org/apache/catalina/connector/Request.java (original) +++ tomcat/trunk/java/org/apache/catalina/connector/Request.java Fri May 24 17:46:27 2013 @@ -2629,7 +2629,11 @@ public class Request try { String encoding = parameters.getEncoding(); if (encoding == null) { -encoding = Parameters.DEFAULT_ENCODING; +if (enc == null) { +encoding = Parameters.DEFAULT_ENCODING; +} else { +encoding = enc; +} } value = part.getString(encoding); } catch (UnsupportedEncodingException uee) { Modified: tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java?rev=1486134&r1=1486133&r2=1486134&view=diff == --- tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java (original) +++ tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java Fri May 24 17:46:27 2013 @@ -17,12 +17,17 @@ package org.apache.catalina.connector; +import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.net.HttpURLConnection; import java.net.URL; +import java.util.ArrayList; import java.util.Enumeration; +import java.util.List; import java.util.TreeMap; import javax.servlet.ServletException; @@ -33,6 +38,7 @@ import javax.servlet.http.HttpServletRes import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; import org.junit.Test; @@ -362,7 +368,7 @@ public class TestRequest extends TomcatB root.addServletMapping("/", "Bug37794"); tomcat.start(); -HttpURLConnection conn = getConnection(); +HttpURLConnection conn = getConnection("http://localhost:"; + getPort() + "/"); InputStream is = conn.getInputStream(); assertNotNull(is); } @@ -376,7 +382,7 @@ public class TestRequest extends TomcatB root.addServletMapping("/", "Bug37794"); tomcat.start(); -HttpURLConnection conn = getConnection(); +HttpURLConnection conn = getConnection("http://localhost:"; + getPort() + "/"); conn.setChunkedStreamingMode(8 * 1024); InputStream is = conn.getInputStream(); assertNotNull(is); @@ -459,6 +465,34 @@ public class TestRequest extends TomcatB */ } +@Test +public void testBug54984() throws Exception { +Tomcat tomcat = getTomcatInstance(); +Context root = tomcat.addContext("", +System.getProperty("java.io.tmpdir")); +root.setAllowCasualMultipartParsing(true); +Tomcat.addServlet(root, "Bug54984", new Bug54984Servlet()); +root.addServletMapping("/", "Bug54984"); +tomcat.start(); + +HttpURLConnection conn = getConnection("http://localhost:"; + getPort() ++ "/parseParametersBeforeParseParts"); + +prepareRequestBug54984(conn); + +checkResponseBug54984(conn); + +conn.disconnect(); + +conn = getConnection("http://localhost:"; + getPort() + "/"); + +prepareRequestBug54984(conn); + +checkResponseBug54984(conn); + +conn.disconnect(); +} + /** * */ @@ -577,8 +611,7 @@ public class TestRequest extends TomcatB } } -private HttpURLConnection getConnection() throws IOException { -final String query = "http://localhost:"; + getPort() + "/"; +private HttpURLConnection getConnection(String query) throws IOException { URL postURL; postURL = new URL(query); HttpURLConnection conn = (HttpURLConnection) postURL.openConnection(); @@ -591,4 +624,74 @@ public class TestRequest extends TomcatB return
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/4373 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1486134 Blamelist: violetagg BUILD FAILED: failed compile_1 sincerely, -The Buildbot
[Bug 55017] Ability to configure RMI bind address
https://issues.apache.org/bugzilla/show_bug.cgi?id=55017 --- Comment #1 from Christopher Schultz --- I think the code starting at line 217 should probably be an "else" of this if clause: if (rmiSSL) { csf = new SslRMIClientSocketFactory(); ssf = new SslRMIServerSocketFactory(ciphers, protocols, clientAuth); } Otherwise, if rmiSSL and rmiBindAddress are both set, rmiBindAddress will take precedence and a) we'll create and discard objects for no reason and b) potentially open a security vulnerability because the user might think they can have both SSL and a specific address. We might even want to detect the current incompatibility (I also don't see a way to specify an interface when creating an SslRMIServerSocketFactory) and throw an error. Can you adjust your patch? -- 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
[Bug 55017] Ability to configure RMI bind address
https://issues.apache.org/bugzilla/show_bug.cgi?id=55017 Alexey Noskov changed: What|Removed |Added Attachment #30319|0 |1 is obsolete|| -- 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
[Bug 55017] Ability to configure RMI bind address
https://issues.apache.org/bugzilla/show_bug.cgi?id=55017 --- Comment #2 from Alexey Noskov --- Created attachment 30320 --> https://issues.apache.org/bugzilla/attachment.cgi?id=30320&action=edit Patch to provider bind rmi bind address setup ability (updated) Just adjusted patch: added else clause + warning if both options are set -- 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
[PATCH] jdbc-pool | FairBlockingQueue
Hello, out of pure curiosity I was browsing the source of jdbc-pool and ended up looking through FairBlockingQueue. FairBlockingQueue utilises a global ReentrantLock for mutual exclusion. Common practice is to always follow a call to lock with a try-finally block. The methods poll(long, TimeUnit), pollAsync() don't use that practice. I was wondering why. Attached is modified version of FairBlockingQueue. I know FairBlockingQueue is a sensitive part of jdbc-pool and I am certainly not trying to smart ass. Its just interest and probably only a minor issue. Thanks! bj - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55017] Ability to configure RMI bind address
https://issues.apache.org/bugzilla/show_bug.cgi?id=55017 --- Comment #3 from Christopher Schultz --- I think conflicting settings should actually fail to configure the connector, rather than playing favorites. -- 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
[Bug 55017] Ability to configure RMI bind address
https://issues.apache.org/bugzilla/show_bug.cgi?id=55017 --- Comment #4 from Alexey Noskov --- Well. But then which exception should be thrown here? Or there is other preferred way to fail configuring the connector? -- 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
[Bug 52231] Ant Tasks need to reflect changes in manager commands
https://issues.apache.org/bugzilla/show_bug.cgi?id=52231 Christopher Schultz changed: What|Removed |Added Status|NEW |RESOLVED Component|Library |Integration Resolution|--- |INVALID Product|Tomcat Native |Tomcat 7 --- Comment #1 from Christopher Schultz --- Re-filing under Tomcat 7 -- this is not related to Tomcat Native. Also, AbstractCatalinaTask takes care of the "/text" portion of this URL, so the bug is invalid as reported. -- 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
[Bug 52627] Segmentation fault in org.apache.tomcat.jni.File.infoGet() native method
https://issues.apache.org/bugzilla/show_bug.cgi?id=52627 Christopher Schultz changed: What|Removed |Added Attachment #28291|application/octet-stream|text/plain mime type|| -- 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: r1486216 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
Author: markt Date: Fri May 24 20:56:28 2013 New Revision: 1486216 URL: http://svn.apache.org/r1486216 Log: Trigger non-blocking error handling if the client hangs up while an APR socket is in the Poller. Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1486216&r1=1486215&r2=1486216&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Fri May 24 20:56:28 2013 @@ -1694,8 +1694,38 @@ public class AprEndpoint extends Abstrac } else if (((desc[n*2] & Poll.APR_POLLHUP) == Poll.APR_POLLHUP) || ((desc[n*2] & Poll.APR_POLLERR) == Poll.APR_POLLERR) || ((desc[n*2] & Poll.APR_POLLNVAL) == Poll.APR_POLLNVAL)) { -// Close socket and clear pool -destroySocket(desc[n*2+1]); +if (wrapper.isAsync()) { +// Must be using non-blocking IO for the socket to be in the +// poller during async processing. Need to trigger error +// handling. Poller will return error codes plus the flags it +// was waiting for.We could return ASYNC_[WRITE|READ]_ERROR +// error here but if we do, there will be no exception +// associated with the error. By signalling read/write is +// possible, a read/write will be attempted, fail and that +// will trigger an exception +if ((desc[n*2] & Poll.APR_POLLIN) == Poll.APR_POLLIN) { +System.out.println("Poller socket error read"); +// Must be doing a non-blocking read +if (!processSocket(desc[n*2+1], SocketStatus.OPEN_READ)) { +// Close socket and clear pool +destroySocket(desc[n*2+1]); +} +} else if ((desc[n*2] & Poll.APR_POLLOUT) == Poll.APR_POLLOUT) { +System.out.println("Poller socket error write"); +// Must be doing an non-blocking write write +if (!processSocket(desc[n*2+1], SocketStatus.OPEN_WRITE)) { +// Close socket and clear pool +destroySocket(desc[n*2+1]); +} +} else { +System.out.println("Poller socket error other: " + wrapper.pollerFlags + " " + desc[n*2]); +// Close socket and clear pool +destroySocket(desc[n*2+1]); +} +} else { +// Close socket and clear pool +destroySocket(desc[n*2+1]); +} } else if (((desc[n*2] & Poll.APR_POLLIN) == Poll.APR_POLLIN) || ((desc[n*2] & Poll.APR_POLLOUT) == Poll.APR_POLLOUT)) { boolean error = false; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 52627] Segmentation fault in org.apache.tomcat.jni.File.infoGet() native method
https://issues.apache.org/bugzilla/show_bug.cgi?id=52627 --- Comment #4 from Christopher Schultz --- Can you give some more information about the crash? For example, build tcnative with debugging symbols and then post the JVM crash dump? I don't see why zeroing-out a apr_finfo_t structure before calling apr_file_info_get would fix anything, since that structure is only used to deposit information, not to read information. I think the real problem is that the (tcnative) fill_finfo function isn't sensitive to which fields in the apr_finfo_t structure are actually valid, so it does stupid things like trying to create UTF strings out of potentially invalid (char *) values. -- 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: r1486217 - /tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java
Author: violetagg Date: Fri May 24 20:58:10 2013 New Revision: 1486217 URL: http://svn.apache.org/r1486217 Log: Temporary disable the test check. Modified: tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java Modified: tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java?rev=1486217&r1=1486216&r2=1486217&view=diff == --- tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java (original) +++ tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java Fri May 24 20:58:10 2013 @@ -684,7 +684,7 @@ public class TestRequest extends TomcatB while ((line = reader.readLine()) != null) { response.add(line); } -assertTrue(response.contains("Part äö")); +//assertTrue(response.contains("Part äö")); } catch (Exception e) { if (reader != null) { reader.close(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1486217 - /tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java
On 24/05/2013 21:58, violet...@apache.org wrote: > Author: violetagg > Date: Fri May 24 20:58:10 2013 > New Revision: 1486217 > > URL: http://svn.apache.org/r1486217 > Log: > Temporary disable the test check. Why? And why does this need to be in svn rather than a local change? Mark > > Modified: > tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java > > Modified: tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java > URL: > http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java?rev=1486217&r1=1486216&r2=1486217&view=diff > == > --- tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java > (original) > +++ tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java Fri May > 24 20:58:10 2013 > @@ -684,7 +684,7 @@ public class TestRequest extends TomcatB > while ((line = reader.readLine()) != null) { > response.add(line); > } > -assertTrue(response.contains("Part äö")); > +//assertTrue(response.contains("Part äö")); > } catch (Exception e) { > if (reader != null) { > reader.close(); > > > > - > 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: r1486219 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
Author: markt Date: Fri May 24 21:04:51 2013 New Revision: 1486219 URL: http://svn.apache.org/r1486219 Log: Remove some debug hacks accidently included in previous commit Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1486219&r1=1486218&r2=1486219&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Fri May 24 21:04:51 2013 @@ -1704,21 +1704,18 @@ public class AprEndpoint extends Abstrac // possible, a read/write will be attempted, fail and that // will trigger an exception if ((desc[n*2] & Poll.APR_POLLIN) == Poll.APR_POLLIN) { -System.out.println("Poller socket error read"); // Must be doing a non-blocking read if (!processSocket(desc[n*2+1], SocketStatus.OPEN_READ)) { // Close socket and clear pool destroySocket(desc[n*2+1]); } } else if ((desc[n*2] & Poll.APR_POLLOUT) == Poll.APR_POLLOUT) { -System.out.println("Poller socket error write"); // Must be doing an non-blocking write write if (!processSocket(desc[n*2+1], SocketStatus.OPEN_WRITE)) { // Close socket and clear pool destroySocket(desc[n*2+1]); } } else { -System.out.println("Poller socket error other: " + wrapper.pollerFlags + " " + desc[n*2]); // Close socket and clear pool destroySocket(desc[n*2+1]); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [PATCH] jdbc-pool | FairBlockingQueue
Björn, On 5/24/13 4:08 PM, Björn Raupach wrote: > out of pure curiosity I was browsing the source of jdbc-pool and > ended up looking through FairBlockingQueue. FairBlockingQueue > utilises a global ReentrantLock for mutual exclusion. Common practice > is to always follow a call to lock with a try-finally block. The > methods poll(long, TimeUnit), pollAsync() don't use that practice. I > was wondering why. Attached is modified version of FairBlockingQueue. > I know FairBlockingQueue is a sensitive part of jdbc-pool and I am > certainly not trying to smart ass. Its just interest and probably > only a minor issue. Your attachment has been stripped from the list. It's best to attach patches to Bugzilla entries, but I'd wait and see if anyone objects to the idea before filing the bug. If you can write a test that demonstrates a bug, that would be even better... "bug fixes" that come from pure code-reviews tend to be viewed skeptically around here, though this one seems to theoretically lead to deadlock. If it can theoretically lead to deadlock, can you force a situation where it *actually* leads to deadlock (or some other unfortunate condition)? -chris signature.asc Description: OpenPGP digital signature
[Bug 55017] Ability to configure RMI bind address
https://issues.apache.org/bugzilla/show_bug.cgi?id=55017 --- Comment #5 from Christopher Schultz --- Hmm... I thought sure that LifecycleListeners could throw checked exceptions, but it seems they can't. I'm still not happy with this not failing-fast. What happens if you throw an IllegalStateException... will Tomcat fail to start? If it doesn't, we might have to re-think things. -- 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
[Bug 55017] Ability to configure RMI bind address
https://issues.apache.org/bugzilla/show_bug.cgi?id=55017 Alexey Noskov changed: What|Removed |Added Attachment #30320|0 |1 is obsolete|| -- 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
[Bug 55017] Ability to configure RMI bind address
https://issues.apache.org/bugzilla/show_bug.cgi?id=55017 --- Comment #6 from Alexey Noskov --- Created attachment 30321 --> https://issues.apache.org/bugzilla/attachment.cgi?id=30321&action=edit Patch to provider bind rmi bind address setup ability (updated, 2) Yes, with IllegalStateException Tomcat fails to start. Updated patch with it. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot success in ASF Buildbot on tomcat-trunk
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/4374 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1486217 Blamelist: markt,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
[Bug 52627] Segmentation fault in org.apache.tomcat.jni.File.infoGet() native method
https://issues.apache.org/bugzilla/show_bug.cgi?id=52627 --- Comment #5 from Ilya Maykov --- It's been a while since I reported this bug and I've had my work machine upgraded since then, so I probably don't have the necessary environment to reproduce this quickly. But from what I remember, yes the bug was in some native function trying interpret garbage values in the stack-allocated apr_finfo_t struct as char* pointers ... I think ... like I said it's been a while. -- 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: r1486294 - /tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java
Author: violetagg Date: Sat May 25 06:59:25 2013 New Revision: 1486294 URL: http://svn.apache.org/r1486294 Log: Enable the test check again. Now it is also passing on OS different than Windows. Modified: tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java Modified: tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java?rev=1486294&r1=1486293&r2=1486294&view=diff == --- tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java (original) +++ tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java Sat May 25 06:59:25 2013 @@ -639,6 +639,10 @@ public class TestRequest extends TomcatB } req.getPart("part"); + +resp.setContentType("text/plain"); +resp.setCharacterEncoding("UTF-8"); + resp.getWriter().println("Part " + req.getParameter("part")); } } @@ -679,12 +683,12 @@ public class TestRequest extends TomcatB BufferedReader reader = null; try { reader = new BufferedReader(new InputStreamReader( -conn.getInputStream())); +conn.getInputStream(), "UTF-8")); String line = null; while ((line = reader.readLine()) != null) { response.add(line); } -//assertTrue(response.contains("Part äö")); +assertTrue(response.contains("Part äö")); } catch (Exception e) { if (reader != null) { reader.close(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org