[tomcat] branch master updated: Korean translations for 7 missing keys
This is an automated email from the ASF dual-hosted git repository. woonsan pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/master by this push: new 2103294 Korean translations for 7 missing keys 2103294 is described below commit 2103294906021abb5c819c708f2809551810203b Author: Woonsan Ko AuthorDate: Wed May 1 21:26:17 2019 -0400 Korean translations for 7 missing keys --- java/org/apache/catalina/servlets/LocalStrings_ko.properties | 2 ++ java/org/apache/coyote/http2/LocalStrings_ko.properties| 2 ++ java/org/apache/tomcat/util/modeler/LocalStrings_ko.properties | 1 + java/org/apache/tomcat/util/net/LocalStrings_ko.properties | 2 ++ 4 files changed, 7 insertions(+) diff --git a/java/org/apache/catalina/servlets/LocalStrings_ko.properties b/java/org/apache/catalina/servlets/LocalStrings_ko.properties index 3ad15dc..8d96c14 100644 --- a/java/org/apache/catalina/servlets/LocalStrings_ko.properties +++ b/java/org/apache/catalina/servlets/LocalStrings_ko.properties @@ -23,6 +23,8 @@ cgiServlet.expandOk=[{0}] 경로에 있는 스트립트가 [{1}](으)로 압축 cgiServlet.find.found=CGI 발견: 이름 [{0}], 경로 [{1}], 스크립트 이름 [{2}], CGI 이름 [{3}] cgiServlet.find.location=[{0}]에 위치한 파일을 찾는 중 cgiServlet.find.path=CGI 위치 [{1}]에 대해 상대적 경로 [{0}]에 위치한, CGI 스크립트가 요청되었습니다. +cgiServlet.invalidArgumentDecoded=디코드된 명령 행 아규먼트 [{0}]이(가), 설정된 cmdLineArgumentsDecoded 패턴 [{1}]과(와) 부합되지 않습니다. +cgiServlet.invalidArgumentEncoded=인코드된 명령 행 아규먼트 [{0}]이(가), 설정된 cmdLineArgumentsEncoded 패턴 [{1}]과(와) 부합되지 않습니다. cgiServlet.runBadHeader=잘못된 헤더 행: [{0}] cgiServlet.runFail=CGI 처리 중 I/O 문제 발생 cgiServlet.runHeaderReaderFail=헤더를 읽기 위한 reader를 닫는 중 I/O 문제 발생 diff --git a/java/org/apache/coyote/http2/LocalStrings_ko.properties b/java/org/apache/coyote/http2/LocalStrings_ko.properties index 68713f3..9925ae2 100644 --- a/java/org/apache/coyote/http2/LocalStrings_ko.properties +++ b/java/org/apache/coyote/http2/LocalStrings_ko.properties @@ -44,6 +44,7 @@ hpackdecoder.zeroNotValidHeaderTableIndex=0은 유효한 헤더 테이블 인덱 hpackhuffman.huffmanEncodedHpackValueDidNotEndWithEOS=HPACK 헤더들 내의 Huffman 알고리즘으로 인코딩된 값이, EOS padding으로 끝나지 않았습니다. hpackhuffman.stringLiteralTooMuchPadding=Huffman 알고리즘으로 인코딩된 문자열의 끝에 7 비트를 초과한 EOS padding입니다. +http2Parser.error=연결 [{0}], 스트림 [{1}], 프레임 타입 [{2}], 오류 발생 http2Parser.headerLimitCount=연결 [{0}], 스트림 [{1}], 너무 많은 헤더들이 있음 http2Parser.headerLimitSize=연결 [{0}], 스트림 [{1}], 전체 헤더 크기가 너무 큽니다. http2Parser.headers.wrongFrameType=연결 [{0}], 스트림 [{1}]을(를) 위한 헤더들이 진행중이지만, 타입 [{2}]의 프레임을 받았습니다. @@ -103,6 +104,7 @@ stream.reset.send=연결 [{0}], 스트림 [{1}], [{2}](으)로 인하여 재설 stream.trailerHeader.noEndOfStream=연결 [{0}], 스트림 [{1}], Trailer 헤더들이 스트림의 끝 플래그를 포함하지 않았습니다. stream.writeTimeout=스트림 데이터가 쓰여지도록 허용하기 위한 흐름 제어 (flow control) 윈도우를, 클라이언트가 증가시키기를 일정 시간 동안 기다리는 중입니다. +streamProcessor.cancel=연결 [{0}], 스트림 [{1}], 요청의 body가 완전히 읽히지 않고 남아 있어, 더 이상 데이터는 불필요합니다. streamProcessor.error.connection=연결 [{0}], 스트림 [{1}]: 처리 중 해당 연결에 심각한 오류 발생 streamProcessor.error.stream=연결 [{0}], 스트림 [{1}], 처리 중 스트림에 치명적인 오류가 발생했습니다. streamProcessor.flushBufferedWrite.entry=연결 [{0}], 스트림 [{1}], 버퍼에 쓰여진 데이터를 배출합니다. diff --git a/java/org/apache/tomcat/util/modeler/LocalStrings_ko.properties b/java/org/apache/tomcat/util/modeler/LocalStrings_ko.properties index 91660d8..46a89fd 100644 --- a/java/org/apache/tomcat/util/modeler/LocalStrings_ko.properties +++ b/java/org/apache/tomcat/util/modeler/LocalStrings_ko.properties @@ -39,6 +39,7 @@ modules.readDescriptorsError=Descriptor들을 읽는 중 오류 발생 registry.initError=[{0}]을(를) 초기화하는 중 오류 발생 registry.loadError=[{0}](으)로부터 descriptor들을 로드하는 중 오류 발생 +registry.noDisable=이미 초기화 되었기 때문에, MBean 레지스트리는 사용 불능 상태로 될 수 없습니다. registry.noMetadata=객체 [{0}]을(를) 위한 메타데이터를 찾을 수 없습니다. registry.noTypeMetadata=타입 [{0}]을(를) 위한 메타데이터를 찾을 수 없습니다. registry.nullBean=[{0}]을(를) 위해 널 bean을 등록할 수 없습니다. diff --git a/java/org/apache/tomcat/util/net/LocalStrings_ko.properties b/java/org/apache/tomcat/util/net/LocalStrings_ko.properties index 70064ed..e44a66d 100644 --- a/java/org/apache/tomcat/util/net/LocalStrings_ko.properties +++ b/java/org/apache/tomcat/util/net/LocalStrings_ko.properties @@ -64,6 +64,7 @@ endpoint.apr.remoteport=APR 소켓 [{0}]이(가) 원격 포트 [{1}](으)로 열 endpoint.apr.tooManyCertFiles=AprEndpoint가 처리할 수 있는 것 보다 더 많은 인증서 파일들이 설정되었습니다. endpoint.debug.channelCloseFail=채널을 닫지 못했습니다. endpoint.debug.destroySocket=소켓 [{0}]을(를) 소멸시킵니다. +endpoint.debug.handlerRelease=핸들러가 소켓 wrapper를 해제하지 못했습니다. endpoint.debug.pollerAdd=addList에 추가합니다: 소켓 [{0}], 제한시간 [{1}], 플래그들 [{2}] endpoint.debug.pollerAddDo=Poller에 소켓 [{0}]을(를) 추가합니다. endpoint.debug.pollerProcess=다음 이벤트(들)을 위해 소켓 [{0}]을(를) 처리합니다: [{1}] @@ -115,6 +116,7 @@ endpoint.processing.fail=소켓 프로세서 실행 중 오류 발생 endpoint.rejectedExecution=[{0}]을(를) 위한 소켓 처리 요청이 거절되었습니다. endpoint.removeDefaultSslHostConfig=기본 SSLHostConfig(이름: [{0}])는 제거될 수 없습니다. endpoint.sendfile.addfail=Sendfile 실
[tomcat] branch master updated: Update version
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/master by this push: new cd84c48 Update version cd84c48 is described below commit cd84c48ea8c6364f33590f4cffe9ce699172b487 Author: remm AuthorDate: Thu May 2 01:03:12 2019 +0200 Update version --- res/tomcat-maven/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/tomcat-maven/pom.xml b/res/tomcat-maven/pom.xml index 7630803..7208413 100644 --- a/res/tomcat-maven/pom.xml +++ b/res/tomcat-maven/pom.xml @@ -29,7 +29,7 @@ UTF-8 org.apache.catalina.startup.Tomcat -9.0.17 +9.0.19 - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Remote attendance at Hackathon
On Wed, May 1, 2019 at 5:16 PM Igal Sapir wrote: > > Mark, > > On Wed, May 1, 2019 at 2:03 PM Mark Thomas wrote: > > > Hi all, > > > > What to folks think about setting up a #Tomcat channel on the ASF slack > > instance and using it during the hackathon to interact with folks that > > want to be involved but can't travel? > > > > It would allow general chat as well as topic specific (video - if the > > venue can stand the bandwidth) calls. > > > > I hope to be available for some of Saturday. > > > > We can also use the channel on an ongoing basis if we find it useful. > > > > Thoughts? > > > > I think that it's a great idea. I would have loved to attend in person but > travelling on those dates didn't work for me. Doing so remotely would be > great if possible. +1 Woonsan > > Best, > > Igal - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Tagging 9.0.x and 8.5.x
Hi Mark, Thanks for the heads up! I'd like to fill in some missing Korean translations (~ 10 new items), and push the exported strings in the master branch tonight. Cheers, Woonsan On Wed, May 1, 2019 at 5:23 PM Mark Thomas wrote: > > Hi, > > Just a heads up that I'm intended to tag these soon. Possibly tomorrow > but certainly by the end of the week. I just have a few things I want to > look at first. > > Mark > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Tagging 9.0.x and 8.5.x
Hi, Just a heads up that I'm intended to tag these soon. Possibly tomorrow but certainly by the end of the week. I just have a few things I want to look at first. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 63359] jsp:setProperty not spec compliant
https://bz.apache.org/bugzilla/show_bug.cgi?id=63359 Mark Thomas changed: What|Removed |Added Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #2 from Mark Thomas --- Fixed in: - master for 9.0.20 onwards I don't propose back-porting this unless and until someone complains that 8.5.x or 7.0.x isn't spec compliant. Given that this code has been wrong for well over a decade, I'm not expecting any such reports. -- 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: Remote attendance at Hackathon
Mark, On Wed, May 1, 2019 at 2:03 PM Mark Thomas wrote: > Hi all, > > What to folks think about setting up a #Tomcat channel on the ASF slack > instance and using it during the hackathon to interact with folks that > want to be involved but can't travel? > > It would allow general chat as well as topic specific (video - if the > venue can stand the bandwidth) calls. > > I hope to be available for some of Saturday. > > We can also use the channel on an ongoing basis if we find it useful. > > Thoughts? > I think that it's a great idea. I would have loved to attend in person but travelling on those dates didn't work for me. Doing so remotely would be great if possible. Best, Igal
[tomcat] branch master updated: Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63359 jsp:setProperty
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/master by this push: new fb78a72 Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63359 jsp:setProperty fb78a72 is described below commit fb78a724c043953f221b7a04c492e1891ddc825e Author: Mark Thomas AuthorDate: Wed May 1 22:14:36 2019 +0100 Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63359 jsp:setProperty Ensure that the conversions from String are as per JSP.1.14.2.1. Specifically: - "on" is no longer converted to boolean true - "" is converted to 0 rather than triggering an error for numeric types - File is no longer a supported target type - If the target type is Object, a new String rather than a new String array is created - If a PropertyEditor is not available or an error occurs "" is converted to null rather than triggering an error --- .../apache/jasper/runtime/JspRuntimeLibrary.java | 90 +--- .../jasper/runtime/TestJspRuntimeLibrary.java | 143 test/org/apache/jasper/runtime/TesterBean.java | 252 + test/org/apache/jasper/runtime/TesterTypeA.java| 42 .../apache/jasper/runtime/TesterTypeAEditor.java | 30 +++ test/org/apache/jasper/runtime/TesterTypeB.java| 25 ++ test/webapp/bug6/bug63359a.jsp | 202 + webapps/docs/changelog.xml | 10 + 8 files changed, 765 insertions(+), 29 deletions(-) diff --git a/java/org/apache/jasper/runtime/JspRuntimeLibrary.java b/java/org/apache/jasper/runtime/JspRuntimeLibrary.java index e846229..a44c046 100644 --- a/java/org/apache/jasper/runtime/JspRuntimeLibrary.java +++ b/java/org/apache/jasper/runtime/JspRuntimeLibrary.java @@ -211,32 +211,54 @@ public class JspRuntimeLibrary { if (propertyEditorClass != null) { return getValueFromBeanInfoPropertyEditor( t, propertyName, s, propertyEditorClass); -} else if ( t.equals(Boolean.class) || t.equals(Boolean.TYPE) ) { -if (s.equalsIgnoreCase("on") || s.equalsIgnoreCase("true")) -s = "true"; -else -s = "false"; +} else if (t.equals(Boolean.class) || t.equals(Boolean.TYPE)) { return Boolean.valueOf(s); -} else if ( t.equals(Byte.class) || t.equals(Byte.TYPE) ) { -return Byte.valueOf(s); +} else if (t.equals(Byte.class) || t.equals(Byte.TYPE)) { +if (s.length() == 0) { +return Byte.valueOf((byte)0); +} else { +return Byte.valueOf(s); +} } else if (t.equals(Character.class) || t.equals(Character.TYPE)) { -return s.length() > 0 ? Character.valueOf(s.charAt(0)) : null; -} else if ( t.equals(Short.class) || t.equals(Short.TYPE) ) { -return Short.valueOf(s); -} else if ( t.equals(Integer.class) || t.equals(Integer.TYPE) ) { -return Integer.valueOf(s); -} else if ( t.equals(Float.class) || t.equals(Float.TYPE) ) { -return Float.valueOf(s); -} else if ( t.equals(Long.class) || t.equals(Long.TYPE) ) { -return Long.valueOf(s); -} else if ( t.equals(Double.class) || t.equals(Double.TYPE) ) { -return Double.valueOf(s); +if (s.length() == 0) { +return Character.valueOf((char) 0); +} else { +return Character.valueOf(s.charAt(0)); +} +} else if (t.equals(Double.class) || t.equals(Double.TYPE)) { +if (s.length() == 0) { +return Double.valueOf(0); +} else { +return Double.valueOf(s); +} +} else if (t.equals(Integer.class) || t.equals(Integer.TYPE)) { +if (s.length() == 0) { +return Integer.valueOf(0); +} else { +return Integer.valueOf(s); +} +} else if (t.equals(Float.class) || t.equals(Float.TYPE)) { +if (s.length() == 0) { +return Float.valueOf(0); +} else { +return Float.valueOf(s); +} +} else if (t.equals(Long.class) || t.equals(Long.TYPE)) { +if (s.length() == 0) { +return Long.valueOf(0); +} else { +return Long.valueOf(s); +} +} else if (t.equals(Short.class) || t.equals(Short.TYPE)) { +if (s.length() == 0) { +return Short.valueO
[Bug 63359] jsp:setProperty not spec compliant
https://bz.apache.org/bugzilla/show_bug.cgi?id=63359 --- Comment #1 from Mark Thomas --- Both the TCK and the Tomcat test suite pass with all the fixes in place. -- 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
Remote attendance at Hackathon
Hi all, What to folks think about setting up a #Tomcat channel on the ASF slack instance and using it during the hackathon to interact with folks that want to be involved but can't travel? It would allow general chat as well as topic specific (video - if the venue can stand the bandwidth) calls. I hope to be available for some of Saturday. We can also use the channel on an ongoing basis if we find it useful. Thoughts? Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch master updated: Add classic NIO2 style read and write
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/master by this push: new 2abb1b9 Add classic NIO2 style read and write 2abb1b9 is described below commit 2abb1b9d4d5b1d2e3aa9b0a5907c4c81b61ac367 Author: remm AuthorDate: Wed May 1 15:13:20 2019 +0200 Add classic NIO2 style read and write Possible use with CompletableFuture which would need exceptions or completion handler failed call to proceed. --- java/org/apache/tomcat/util/net/Nio2Endpoint.java | 20 ++-- java/org/apache/tomcat/util/net/NioEndpoint.java | 20 ++-- .../apache/tomcat/util/net/SocketWrapperBase.java | 54 +- webapps/docs/changelog.xml | 5 ++ 4 files changed, 90 insertions(+), 9 deletions(-) diff --git a/java/org/apache/tomcat/util/net/Nio2Endpoint.java b/java/org/apache/tomcat/util/net/Nio2Endpoint.java index 6d3e5d0..815713a 100644 --- a/java/org/apache/tomcat/util/net/Nio2Endpoint.java +++ b/java/org/apache/tomcat/util/net/Nio2Endpoint.java @@ -31,6 +31,8 @@ import java.nio.channels.CompletionHandler; import java.nio.channels.FileChannel; import java.nio.channels.InterruptedByTimeoutException; import java.nio.channels.NetworkChannel; +import java.nio.channels.ReadPendingException; +import java.nio.channels.WritePendingException; import java.nio.file.StandardOpenOption; import java.util.ArrayList; import java.util.concurrent.ExecutionException; @@ -1007,7 +1009,7 @@ public class Nio2Endpoint extends AbstractJsseEndpoint state = new OperationState<>(true, dsts, offset, length, block, @@ -1076,7 +1083,7 @@ public class Nio2Endpoint extends AbstractJsseEndpoint } else if (unit.toMillis(timeout) != getReadTimeout()) { setReadTimeout(unit.toMillis(timeout)); } -if (block != BlockingMode.NON_BLOCK) { +if (block == BlockingMode.BLOCK || block == BlockingMode.SEMI_BLOCK) { try { if (!readPending.tryAcquire(timeout, unit)) { handler.failed(new SocketTimeoutException(), attachment); @@ -1580,7 +1582,12 @@ public class NioEndpoint extends AbstractJsseEndpoint } } else { if (!readPending.tryAcquire()) { -return CompletionState.NOT_DONE; +if (block == BlockingMode.NON_BLOCK) { +return CompletionState.NOT_DONE; +} else { +handler.failed(new ReadPendingException(), attachment); +return CompletionState.ERROR; +} } } VectoredIOCompletionHandler completion = new VectoredIOCompletionHandler<>(); @@ -1634,7 +1641,7 @@ public class NioEndpoint extends AbstractJsseEndpoint } else if (unit.toMillis(timeout) != getWriteTimeout()) { setWriteTimeout(unit.toMillis(timeout)); } -if (block != BlockingMode.NON_BLOCK) { +if (block == BlockingMode.BLOCK || block == BlockingMode.SEMI_BLOCK) { try { if (!writePending.tryAcquire(timeout, unit)) { handler.failed(new SocketTimeoutException(), attachment); @@ -1646,7 +1653,12 @@ public class NioEndpoint extends AbstractJsseEndpoint } } else { if (!writePending.tryAcquire()) { -return CompletionState.NOT_DONE; +if (block == BlockingMode.NON_BLOCK) { +return CompletionState.NOT_DONE; +} else { +handler.failed(new WritePendingException(), attachment); +return CompletionState.ERROR; +} } } if (!socketBufferHandler.isWriteBufferEmpty()) { diff --git a/java/org/apache/tomcat/util/net/SocketWrapperBase.java b/java/org/apache/tomcat/util/net/SocketWrapperBase.java index cd2e619..b09284a 100644 --- a/java/org/apache/tomcat/util/net/SocketWrapperBase.java +++ b/java/org/apache/tomcat/util/net/SocketWrapperBase.java @@ -808,7 +808,12 @@ public abstract class SocketWrapperBase { public enum BlockingMode { /** - * The operation will now block. If there are pending operations, + * The operation will not block. If there are pending operations, + * the operation will throw a pending exception. + */ +CLASSIC, +/** + * The operation will not block. If there are pending operations, * the operation will return CompletionState.NOT_DONE. */ NON_BLOCK, @@ -1006,6 +1011,29 @@ public abstract class SocketWrapperBase { /** * Scatter read.
Re: catalina.nonblocking.TestNonBlockingAPI
On Tue, Apr 30, 2019 at 2:13 PM Mark Thomas wrote: > On 30/04/2019 12:48, Rémy Maucherat wrote: > > Hi, > > > > There's something odd with this test: > > > https://ci.apache.org/projects/tomcat/tomcat9/logs/4265/TEST-org.apache.catalina.nonblocking.TestNonBlockingAPI.APR.txt > > > https://ci.apache.org/projects/tomcat/tomcat9/logs/4265/TEST-org.apache.catalina.nonblocking.TestNonBlockingAPI.NIO.txt > > > https://ci.apache.org/projects/tomcat/tomcat9/logs/4265/TEST-org.apache.catalina.nonblocking.TestNonBlockingAPI.NIO2.txt > > > > Has it been looked into already why NIO is extremely slow at it and if it > > impacts real world use ? > > I haven't looked at it for performance. My previous work in this area > has always been investigating test failures. > Yes, I wasn't looking at that issue either. But since things are working now (saying this will likely cause the next build to fail in a mysterious new way :) ) I might. Rémy
[Bug 63324] CrawlerSessionManagerValve is getting put into Session, which causes problems when serializing sessions
https://bz.apache.org/bugzilla/show_bug.cgi?id=63324 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #9 from Mark Thomas --- Thanks for the report and the patches to fix this issue. Updating the test cases is particularly appreciated. Fixed in: - master for 9.0.20 onwards - 8.5.x for 8.5.41 onwards - 7.0.x for 7.0.95 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
[tomcat] branch 7.0.x updated: Fix backport
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 7.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/7.0.x by this push: new e2bb82b Fix backport e2bb82b is described below commit e2bb82b0f4ae43634fe7d955e0bfbc2f7b2ac849 Author: Mark Thomas AuthorDate: Wed May 1 11:55:30 2019 +0100 Fix backport --- test/org/apache/catalina/valves/TestCrawlerSessionManagerValve.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/org/apache/catalina/valves/TestCrawlerSessionManagerValve.java b/test/org/apache/catalina/valves/TestCrawlerSessionManagerValve.java index 0d6a46a..30021fb 100644 --- a/test/org/apache/catalina/valves/TestCrawlerSessionManagerValve.java +++ b/test/org/apache/catalina/valves/TestCrawlerSessionManagerValve.java @@ -48,7 +48,7 @@ public class TestCrawlerSessionManagerValve { static { TEST_MANAGER = new StandardManager(); -TEST_MANAGER.setContext(new StandardContext()); +TEST_MANAGER.setContainer(new StandardContext()); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] markt-asf commented on issue #156: Don't place CrawlerSessionManagerValve into session, place data-holder only. For 7.0.x
markt-asf commented on issue #156: Don't place CrawlerSessionManagerValve into session, place data-holder only. For 7.0.x URL: https://github.com/apache/tomcat/pull/156#issuecomment-488256240 Thanks for the PR. I cherry-picked the 8.5.x fix fixed the conflict in the changelog and then applied the 7.0.x specific changes. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] markt-asf closed pull request #156: Don't place CrawlerSessionManagerValve into session, place data-holder only. For 7.0.x
markt-asf closed pull request #156: Don't place CrawlerSessionManagerValve into session, place data-holder only. For 7.0.x URL: https://github.com/apache/tomcat/pull/156 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 7.0.x updated: Place data holder rather than CrawlerSessionManagerValve in session
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 7.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/7.0.x by this push: new 886a779 Place data holder rather than CrawlerSessionManagerValve in session 886a779 is described below commit 886a779582508450a6df2f0dfd88b941dd375be0 Author: Mark Thomas AuthorDate: Wed May 1 11:43:03 2019 +0100 Place data holder rather than CrawlerSessionManagerValve in session Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63324 Refactor the CrawlerSessionManagerValve so that the object placed in the session is compatible with session serialization with mem-cached. Patch provided by Martin Lemanski. --- .../valves/CrawlerSessionManagerValve.java | 33 ++-- .../valves/TestCrawlerSessionManagerValve.java | 46 +- webapps/docs/changelog.xml | 6 +++ 3 files changed, 73 insertions(+), 12 deletions(-) diff --git a/java/org/apache/catalina/valves/CrawlerSessionManagerValve.java b/java/org/apache/catalina/valves/CrawlerSessionManagerValve.java index ac35a3b..773ef09 100644 --- a/java/org/apache/catalina/valves/CrawlerSessionManagerValve.java +++ b/java/org/apache/catalina/valves/CrawlerSessionManagerValve.java @@ -17,6 +17,7 @@ package org.apache.catalina.valves; import java.io.IOException; +import java.io.Serializable; import java.util.Enumeration; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; @@ -42,7 +43,7 @@ import org.apache.juli.logging.LogFactory; * users - regardless of whether or not they provide a session token with their * requests. */ -public class CrawlerSessionManagerValve extends ValveBase implements HttpSessionBindingListener { +public class CrawlerSessionManagerValve extends ValveBase { private static final Log log = LogFactory.getLog(CrawlerSessionManagerValve.class); @@ -241,7 +242,8 @@ public class CrawlerSessionManagerValve extends ValveBase implements HttpSession clientIdSessionId.put(clientIdentifier, s.getId()); sessionIdClientId.put(s.getId(), clientIdentifier); // #valueUnbound() will be called on session expiration -s.setAttribute(this.getClass().getName(), this); +s.setAttribute(this.getClass().getName(), +new CrawlerHttpSessionBindingListener(clientIdSessionId, clientIdentifier)); s.setMaxInactiveInterval(sessionInactiveInterval); if (log.isDebugEnabled()) { @@ -269,18 +271,27 @@ public class CrawlerSessionManagerValve extends ValveBase implements HttpSession return result.toString(); } +private static class CrawlerHttpSessionBindingListener implements HttpSessionBindingListener, Serializable { +private static final long serialVersionUID = 1L; -@Override -public void valueBound(HttpSessionBindingEvent event) { -// NOOP -} +private final transient Map clientIdSessionId; +private final transient String clientIdentifier; +private CrawlerHttpSessionBindingListener(Map clientIdSessionId, String clientIdentifier) { +this.clientIdSessionId = clientIdSessionId; +this.clientIdentifier = clientIdentifier; +} -@Override -public void valueUnbound(HttpSessionBindingEvent event) { -String clientIdentifier = sessionIdClientId.remove(event.getSession().getId()); -if (clientIdentifier != null) { -clientIdSessionId.remove(clientIdentifier); +@Override +public void valueBound(HttpSessionBindingEvent event) { +// NO-OP +} + +@Override +public void valueUnbound(HttpSessionBindingEvent event) { +if (clientIdentifier != null && clientIdSessionId != null) { +clientIdSessionId.remove(clientIdentifier); +} } } } diff --git a/test/org/apache/catalina/valves/TestCrawlerSessionManagerValve.java b/test/org/apache/catalina/valves/TestCrawlerSessionManagerValve.java index 59a192c..0d6a46a 100644 --- a/test/org/apache/catalina/valves/TestCrawlerSessionManagerValve.java +++ b/test/org/apache/catalina/valves/TestCrawlerSessionManagerValve.java @@ -22,19 +22,37 @@ import java.util.Collections; import javax.servlet.ServletException; import javax.servlet.http.HttpSession; +import javax.servlet.http.HttpSessionBindingListener; +import org.hamcrest.CoreMatchers; +import org.hamcrest.MatcherAssert; + +import org.junit.Assert; import org.junit.Test; import org.apache.catalina.Context; import org.apache.catalina.Host; +import org.apache.catalina.Manager; import org.apache.catalina.Valve; import org.apache.catalina.connector.Request; import org.apache.catalina.connector.Response; +import or
[GitHub] [tomcat] markt-asf closed pull request #155: Don't place CrawlerSessionManagerValve into session, place data-holder only. For 8.5.x
markt-asf closed pull request #155: Don't place CrawlerSessionManagerValve into session, place data-holder only. For 8.5.x URL: https://github.com/apache/tomcat/pull/155 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] markt-asf commented on issue #155: Don't place CrawlerSessionManagerValve into session, place data-holder only. For 8.5.x
markt-asf commented on issue #155: Don't place CrawlerSessionManagerValve into session, place data-holder only. For 8.5.x URL: https://github.com/apache/tomcat/pull/155#issuecomment-488255406 Thanks for the PR. I cherry-picked the 9.0.x fix (with the minor adjustments) and then made the 8.5.x specific changes. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 8.5.x updated: Place data holder rather than CrawlerSessionManagerValve in session
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/8.5.x by this push: new 91217ef Place data holder rather than CrawlerSessionManagerValve in session 91217ef is described below commit 91217ef2a9c57bb947bbc2201f50d44cd4e87aef Author: Mark Thomas AuthorDate: Wed May 1 11:43:03 2019 +0100 Place data holder rather than CrawlerSessionManagerValve in session Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63324 Refactor the CrawlerSessionManagerValve so that the object placed in the session is compatible with session serialization with mem-cached. Patch provided by Martin Lemanski. --- .../valves/CrawlerSessionManagerValve.java | 33 ++-- .../valves/TestCrawlerSessionManagerValve.java | 46 +- webapps/docs/changelog.xml | 6 +++ 3 files changed, 73 insertions(+), 12 deletions(-) diff --git a/java/org/apache/catalina/valves/CrawlerSessionManagerValve.java b/java/org/apache/catalina/valves/CrawlerSessionManagerValve.java index aab1caf..1bef60c 100644 --- a/java/org/apache/catalina/valves/CrawlerSessionManagerValve.java +++ b/java/org/apache/catalina/valves/CrawlerSessionManagerValve.java @@ -17,6 +17,7 @@ package org.apache.catalina.valves; import java.io.IOException; +import java.io.Serializable; import java.util.Enumeration; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; @@ -42,7 +43,7 @@ import org.apache.juli.logging.LogFactory; * users - regardless of whether or not they provide a session token with their * requests. */ -public class CrawlerSessionManagerValve extends ValveBase implements HttpSessionBindingListener { +public class CrawlerSessionManagerValve extends ValveBase { private static final Log log = LogFactory.getLog(CrawlerSessionManagerValve.class); @@ -241,7 +242,8 @@ public class CrawlerSessionManagerValve extends ValveBase implements HttpSession clientIdSessionId.put(clientIdentifier, s.getId()); sessionIdClientId.put(s.getId(), clientIdentifier); // #valueUnbound() will be called on session expiration -s.setAttribute(this.getClass().getName(), this); +s.setAttribute(this.getClass().getName(), +new CrawlerHttpSessionBindingListener(clientIdSessionId, clientIdentifier)); s.setMaxInactiveInterval(sessionInactiveInterval); if (log.isDebugEnabled()) { @@ -269,18 +271,27 @@ public class CrawlerSessionManagerValve extends ValveBase implements HttpSession return result.toString(); } +private static class CrawlerHttpSessionBindingListener implements HttpSessionBindingListener, Serializable { +private static final long serialVersionUID = 1L; -@Override -public void valueBound(HttpSessionBindingEvent event) { -// NOOP -} +private final transient Map clientIdSessionId; +private final transient String clientIdentifier; +private CrawlerHttpSessionBindingListener(Map clientIdSessionId, String clientIdentifier) { +this.clientIdSessionId = clientIdSessionId; +this.clientIdentifier = clientIdentifier; +} -@Override -public void valueUnbound(HttpSessionBindingEvent event) { -String clientIdentifier = sessionIdClientId.remove(event.getSession().getId()); -if (clientIdentifier != null) { -clientIdSessionId.remove(clientIdentifier); +@Override +public void valueBound(HttpSessionBindingEvent event) { +// NO-OP +} + +@Override +public void valueUnbound(HttpSessionBindingEvent event) { +if (clientIdentifier != null && clientIdSessionId != null) { +clientIdSessionId.remove(clientIdentifier); +} } } } diff --git a/test/org/apache/catalina/valves/TestCrawlerSessionManagerValve.java b/test/org/apache/catalina/valves/TestCrawlerSessionManagerValve.java index 759a248..ec783d8 100644 --- a/test/org/apache/catalina/valves/TestCrawlerSessionManagerValve.java +++ b/test/org/apache/catalina/valves/TestCrawlerSessionManagerValve.java @@ -22,19 +22,37 @@ import java.util.Collections; import javax.servlet.ServletException; import javax.servlet.http.HttpSession; +import javax.servlet.http.HttpSessionBindingListener; +import org.hamcrest.CoreMatchers; +import org.hamcrest.MatcherAssert; + +import org.junit.Assert; import org.junit.Test; import org.apache.catalina.Context; import org.apache.catalina.Host; +import org.apache.catalina.Manager; import org.apache.catalina.Valve; import org.apache.catalina.connector.Request; import org.apache.catalina.connector.Response; +import or
[GitHub] [tomcat] markt-asf closed pull request #154: Don't place CrawlerSessionManagerValve into session, place data-holder only
markt-asf closed pull request #154: Don't place CrawlerSessionManagerValve into session, place data-holder only URL: https://github.com/apache/tomcat/pull/154 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GitHub] [tomcat] markt-asf commented on issue #154: Don't place CrawlerSessionManagerValve into session, place data-holder only
markt-asf commented on issue #154: Don't place CrawlerSessionManagerValve into session, place data-holder only URL: https://github.com/apache/tomcat/pull/154#issuecomment-488254573 Patch applied manually with a few changes to keep Checkstyle etc happy. I also added a changelog entry. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch master updated: Place data holder rather than CrawlerSessionManagerValve in session
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/master by this push: new 1c35c6d Place data holder rather than CrawlerSessionManagerValve in session 1c35c6d is described below commit 1c35c6dbd5f158f62a63c428f09537c876bd3735 Author: Mark Thomas AuthorDate: Wed May 1 11:43:03 2019 +0100 Place data holder rather than CrawlerSessionManagerValve in session Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63324 Refactor the CrawlerSessionManagerValve so that the object placed in the session is compatible with session serialization with mem-cached. Patch provided by Martin Lemanski. --- .../valves/CrawlerSessionManagerValve.java | 26 .../valves/TestCrawlerSessionManagerValve.java | 46 +- webapps/docs/changelog.xml | 6 +++ 3 files changed, 70 insertions(+), 8 deletions(-) diff --git a/java/org/apache/catalina/valves/CrawlerSessionManagerValve.java b/java/org/apache/catalina/valves/CrawlerSessionManagerValve.java index a268d4b..0a7968d 100644 --- a/java/org/apache/catalina/valves/CrawlerSessionManagerValve.java +++ b/java/org/apache/catalina/valves/CrawlerSessionManagerValve.java @@ -17,6 +17,7 @@ package org.apache.catalina.valves; import java.io.IOException; +import java.io.Serializable; import java.util.Enumeration; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; @@ -42,7 +43,7 @@ import org.apache.juli.logging.LogFactory; * users - regardless of whether or not they provide a session token with their * requests. */ -public class CrawlerSessionManagerValve extends ValveBase implements HttpSessionBindingListener { +public class CrawlerSessionManagerValve extends ValveBase { private static final Log log = LogFactory.getLog(CrawlerSessionManagerValve.class); @@ -241,7 +242,8 @@ public class CrawlerSessionManagerValve extends ValveBase implements HttpSession clientIdSessionId.put(clientIdentifier, s.getId()); sessionIdClientId.put(s.getId(), clientIdentifier); // #valueUnbound() will be called on session expiration -s.setAttribute(this.getClass().getName(), this); +s.setAttribute(this.getClass().getName(), +new CrawlerHttpSessionBindingListener(clientIdSessionId, clientIdentifier)); s.setMaxInactiveInterval(sessionInactiveInterval); if (log.isDebugEnabled()) { @@ -269,12 +271,22 @@ public class CrawlerSessionManagerValve extends ValveBase implements HttpSession return result.toString(); } +private static class CrawlerHttpSessionBindingListener implements HttpSessionBindingListener, Serializable { +private static final long serialVersionUID = 1L; -@Override -public void valueUnbound(HttpSessionBindingEvent event) { -String clientIdentifier = sessionIdClientId.remove(event.getSession().getId()); -if (clientIdentifier != null) { -clientIdSessionId.remove(clientIdentifier); +private final transient Map clientIdSessionId; +private final transient String clientIdentifier; + +private CrawlerHttpSessionBindingListener(Map clientIdSessionId, String clientIdentifier) { +this.clientIdSessionId = clientIdSessionId; +this.clientIdentifier = clientIdentifier; +} + +@Override +public void valueUnbound(HttpSessionBindingEvent event) { +if (clientIdentifier != null && clientIdSessionId != null) { +clientIdSessionId.remove(clientIdentifier, event.getSession().getId()); +} } } } diff --git a/test/org/apache/catalina/valves/TestCrawlerSessionManagerValve.java b/test/org/apache/catalina/valves/TestCrawlerSessionManagerValve.java index f7a7e26..2055402 100644 --- a/test/org/apache/catalina/valves/TestCrawlerSessionManagerValve.java +++ b/test/org/apache/catalina/valves/TestCrawlerSessionManagerValve.java @@ -22,19 +22,37 @@ import java.util.Collections; import javax.servlet.ServletException; import javax.servlet.http.HttpSession; +import javax.servlet.http.HttpSessionBindingListener; +import org.hamcrest.CoreMatchers; +import org.hamcrest.MatcherAssert; + +import org.junit.Assert; import org.junit.Test; import org.apache.catalina.Context; import org.apache.catalina.Host; +import org.apache.catalina.Manager; import org.apache.catalina.Valve; import org.apache.catalina.connector.Request; import org.apache.catalina.connector.Response; +import org.apache.catalina.core.StandardContext; +import org.apache.catalina.session.StandardManager; +import org.apache.catalina.session.StandardSession; import org.easymock.EasyMock; import org.easy