jetty-9 merge from jetty-8. Mostly compiling but some tests still failing.
Merge remote-tracking branch 'origin/jetty-8' into jetty-9 Conflicts: example-async-rest/async-rest-jar/pom.xml example-async-rest/async-rest-webapp/pom.xml example-async-rest/pom.xml example-jetty-embedded/pom.xml jetty-aggregate/jetty-all-server/pom.xml jetty-aggregate/jetty-all/pom.xml jetty-aggregate/jetty-client/pom.xml jetty-aggregate/jetty-plus/pom.xml jetty-aggregate/jetty-server/pom.xml jetty-aggregate/jetty-servlet/pom.xml jetty-aggregate/jetty-webapp/pom.xml jetty-aggregate/jetty-websocket/pom.xml jetty-aggregate/pom.xml jetty-ajp/pom.xml jetty-annotations/pom.xml jetty-client/pom.xml jetty-continuation/pom.xml jetty-deploy/pom.xml jetty-distribution/pom.xml jetty-http-spi/pom.xml jetty-http/pom.xml jetty-http/src/main/java/org/eclipse/jetty/http/HttpContent.java jetty-http/src/main/java/org/eclipse/jetty/http/HttpFields.java jetty-http/src/main/java/org/eclipse/jetty/http/HttpGenerator.java jetty-http/src/main/java/org/eclipse/jetty/http/HttpParser.java jetty-http/src/main/java/org/eclipse/jetty/http/gzip/CompressedResponseWrapper.java jetty-http/src/main/java/org/eclipse/jetty/http/gzip/GzipStream.java jetty-http/src/test/java/org/eclipse/jetty/http/HttpFieldsTest.java jetty-http/src/test/java/org/eclipse/jetty/http/HttpGeneratorClientTest.java jetty-io/pom.xml jetty-io/src/main/java/org/eclipse/jetty/io/AbstractBuffers.java jetty-io/src/main/java/org/eclipse/jetty/io/AbstractConnection.java jetty-io/src/main/java/org/eclipse/jetty/io/AsyncEndPoint.java jetty-io/src/main/java/org/eclipse/jetty/io/Buffer.java jetty-io/src/main/java/org/eclipse/jetty/io/BuffersFactory.java jetty-io/src/main/java/org/eclipse/jetty/io/ByteArrayBuffer.java jetty-io/src/main/java/org/eclipse/jetty/io/ByteArrayEndPoint.java jetty-io/src/main/java/org/eclipse/jetty/io/ConnectedEndPoint.java jetty-io/src/main/java/org/eclipse/jetty/io/Connection.java jetty-io/src/main/java/org/eclipse/jetty/io/PooledBuffers.java jetty-io/src/main/java/org/eclipse/jetty/io/bio/StreamEndPoint.java jetty-io/src/main/java/org/eclipse/jetty/io/bio/StringEndPoint.java jetty-io/src/main/java/org/eclipse/jetty/io/nio/ChannelEndPoint.java jetty-io/src/main/java/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java jetty-io/src/main/java/org/eclipse/jetty/io/nio/SelectorManager.java jetty-io/src/main/java/org/eclipse/jetty/io/nio/SslConnection.java jetty-io/src/test/java/org/eclipse/jetty/io/ChannelEndPointTest.java jetty-io/src/test/java/org/eclipse/jetty/io/bio/SocketEndPointTest.java jetty-io/src/test/java/org/eclipse/jetty/io/nio/SelectChannelEndPointSslTest.java jetty-io/src/test/java/org/eclipse/jetty/io/nio/SelectChannelEndPointTest.java jetty-jaspi/pom.xml jetty-jmx/pom.xml jetty-jndi/pom.xml jetty-jsp/pom.xml jetty-monitor/pom.xml jetty-nested/pom.xml jetty-nosql/pom.xml jetty-osgi/jetty-osgi-boot-jsp/pom.xml jetty-osgi/jetty-osgi-boot-warurl/pom.xml jetty-osgi/jetty-osgi-boot/pom.xml jetty-osgi/jetty-osgi-httpservice/pom.xml jetty-osgi/pom.xml jetty-osgi/test-jetty-osgi/pom.xml jetty-overlay-deployer/pom.xml jetty-plus/pom.xml jetty-policy/pom.xml jetty-proxy/src/test/java/org/eclipse/jetty/proxy/ProxyServletTest.java jetty-rewrite/pom.xml jetty-security/pom.xml jetty-server/pom.xml jetty-server/src/main/java/org/eclipse/jetty/server/AbstractConnector.java jetty-server/src/main/java/org/eclipse/jetty/server/AbstractHttpConnection.java jetty-server/src/main/java/org/eclipse/jetty/server/AsyncHttpConnection.java jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannelState.java jetty-server/src/main/java/org/eclipse/jetty/server/Request.java jetty-server/src/main/java/org/eclipse/jetty/server/Response.java jetty-server/src/main/java/org/eclipse/jetty/server/Server.java jetty-server/src/main/java/org/eclipse/jetty/server/handler/ConnectHandler.java jetty-server/src/main/java/org/eclipse/jetty/server/handler/GzipHandler.java jetty-server/src/main/java/org/eclipse/jetty/server/nio/SelectChannelConnector.java jetty-server/src/test/java/org/eclipse/jetty/server/HttpServerTestBase.java jetty-server/src/test/java/org/eclipse/jetty/server/LocalAsyncContextTest.java jetty-server/src/test/java/org/eclipse/jetty/server/RequestTest.java jetty-server/src/test/java/org/eclipse/jetty/server/ResponseTest.java jetty-server/src/test/java/org/eclipse/jetty/server/SuspendHandler.java jetty-server/src/test/java/org/eclipse/jetty/server/handler/ConnectHandlerTest.java jetty-server/src/test/java/org/eclipse/jetty/server/session/SessionHandlerTest.java jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLCloseTest.java jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SSLEngineTest.java jetty-server/src/test/java/org/eclipse/jetty/server/ssl/SslSocketServerTest.java jetty-servlet/pom.xml jetty-servlet/src/main/java/org/eclipse/jetty/servlet/DefaultServlet.java jetty-servlets/pom.xml jetty-servlets/src/main/java/org/eclipse/jetty/servlets/GzipFilter.java jetty-servlets/src/test/java/org/eclipse/jetty/servlets/IncludableGzipFilterTest.java jetty-servlets/src/test/java/org/eclipse/jetty/servlets/MultipartFilterTest.java jetty-spdy/pom.xml jetty-spdy/spdy-core/pom.xml jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/CompressionDictionary.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/CompressionFactory.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/Controller.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/ISession.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/IStream.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/IdleListener.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/Promise.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/PushSynInfo.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/SessionException.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/StandardCompressionFactory.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/StandardSession.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/StandardStream.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/StreamException.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/ByteBufferDataInfo.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/BytesDataInfo.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/DataInfo.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/GoAwayInfo.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/Headers.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/HeadersInfo.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/PingInfo.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/ReplyInfo.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/RstInfo.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/SPDY.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/SPDYException.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/Session.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/SessionFrameListener.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/SessionStatus.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/Settings.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/SettingsInfo.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/Stream.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/StreamFrameListener.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/StreamStatus.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/StringDataInfo.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/SynInfo.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/server/ServerSessionFrameListener.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/frames/ControlFrame.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/frames/ControlFrameType.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/frames/DataFrame.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/frames/GoAwayFrame.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/frames/HeadersFrame.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/frames/NoOpFrame.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/frames/PingFrame.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/frames/RstStreamFrame.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/frames/SettingsFrame.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/frames/SynReplyFrame.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/frames/SynStreamFrame.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/frames/WindowUpdateFrame.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/generator/ControlFrameGenerator.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/generator/DataFrameGenerator.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/generator/Generator.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/generator/GoAwayGenerator.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/generator/HeadersBlockGenerator.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/generator/HeadersGenerator.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/generator/NoOpGenerator.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/generator/PingGenerator.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/generator/RstStreamGenerator.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/generator/SettingsGenerator.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/generator/SynReplyGenerator.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/generator/SynStreamGenerator.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/generator/WindowUpdateGenerator.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/parser/ControlFrameBodyParser.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/parser/ControlFrameParser.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/parser/DataFrameParser.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/parser/GoAwayBodyParser.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/parser/HeadersBlockParser.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/parser/HeadersBodyParser.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/parser/NoOpBodyParser.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/parser/Parser.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/parser/PingBodyParser.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/parser/RstStreamBodyParser.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/parser/SettingsBodyParser.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/parser/SynReplyBodyParser.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/parser/SynStreamBodyParser.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/parser/UnknownControlFrameBodyParser.java jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/parser/WindowUpdateBodyParser.java jetty-spdy/spdy-core/src/test/java/org/eclipse/jetty/spdy/AsyncTimeoutTest.java jetty-spdy/spdy-core/src/test/java/org/eclipse/jetty/spdy/StandardSessionTest.java jetty-spdy/spdy-core/src/test/java/org/eclipse/jetty/spdy/StandardStreamTest.java jetty-spdy/spdy-core/src/test/java/org/eclipse/jetty/spdy/api/ClientUsageTest.java jetty-spdy/spdy-core/src/test/java/org/eclipse/jetty/spdy/api/ServerUsageTest.java jetty-spdy/spdy-core/src/test/java/org/eclipse/jetty/spdy/frames/DataGenerateParseTest.java jetty-spdy/spdy-core/src/test/java/org/eclipse/jetty/spdy/frames/GoAwayGenerateParseTest.java jetty-spdy/spdy-core/src/test/java/org/eclipse/jetty/spdy/frames/HeadersGenerateParseTest.java jetty-spdy/spdy-core/src/test/java/org/eclipse/jetty/spdy/frames/NoOpGenerateParseTest.java jetty-spdy/spdy-core/src/test/java/org/eclipse/jetty/spdy/frames/PingGenerateParseTest.java jetty-spdy/spdy-core/src/test/java/org/eclipse/jetty/spdy/frames/RstStreamGenerateParseTest.java jetty-spdy/spdy-core/src/test/java/org/eclipse/jetty/spdy/frames/SettingsGenerateParseTest.java jetty-spdy/spdy-core/src/test/java/org/eclipse/jetty/spdy/frames/SynReplyGenerateParseTest.java jetty-spdy/spdy-core/src/test/java/org/eclipse/jetty/spdy/frames/SynStreamGenerateParseTest.java jetty-spdy/spdy-core/src/test/java/org/eclipse/jetty/spdy/frames/TestSPDYParserListener.java jetty-spdy/spdy-core/src/test/java/org/eclipse/jetty/spdy/frames/WindowUpdateGenerateParseTest.java jetty-spdy/spdy-core/src/test/java/org/eclipse/jetty/spdy/parser/LiveChromiumRequestParserTest.java jetty-spdy/spdy-core/src/test/java/org/eclipse/jetty/spdy/parser/ParseVersusCacheBenchmarkTest.java jetty-spdy/spdy-core/src/test/java/org/eclipse/jetty/spdy/parser/UnknownControlFrameTest.java jetty-spdy/spdy-jetty-http-webapp/pom.xml jetty-spdy/spdy-jetty-http-webapp/src/main/config/etc/jetty-spdy.xml jetty-spdy/spdy-jetty-http/pom.xml jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/HTTPSPDYServerConnector.java jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/PushStrategy.java jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/ReferrerPushStrategy.java jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/ServerHTTPAsyncConnectionFactory.java jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/ServerHTTPSPDYAsyncConnection.java jetty-spdy/spdy-jetty-http/src/main/java/org/eclipse/jetty/spdy/http/ServerHTTPSPDYAsyncConnectionFactory.java jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/http/AbstractHTTPSPDYTest.java jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/http/ConcurrentStreamsTest.java jetty-spdy/spdy-jetty-http/src/test/java/org/eclipse/jetty/spdy/http/ProtocolNegotiationTest.java jetty-spdy/spdy-jetty/pom.xml jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/AsyncConnectionFactory.java jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/EmptyAsyncConnection.java jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/EmptyAsyncEndPoint.java jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/SPDYAsyncConnection.java jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/SPDYClient.java jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/SPDYServerConnector.java jetty-spdy/spdy-jetty/src/main/java/org/eclipse/jetty/spdy/ServerSPDYAsyncConnectionFactory.java jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/AbstractTest.java jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/ClosedStreamTest.java jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/FlowControlTest.java jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/GoAwayTest.java jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/HeadersTest.java jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/IdleTimeoutTest.java jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/PingTest.java jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/ProtocolViolationsTest.java jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/PushStreamTest.java jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/ResetStreamTest.java jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/SPDYClientFactoryTest.java jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/SPDYServerConnectorTest.java jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/SSLEngineLeakTest.java jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/SSLSynReplyTest.java jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/SettingsTest.java jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/SynDataReplyDataLoadTest.java jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/SynReplyTest.java jetty-spdy/spdy-jetty/src/test/java/org/eclipse/jetty/spdy/UnsupportedVersionTest.java jetty-start/pom.xml jetty-util/pom.xml jetty-util/src/main/java/org/eclipse/jetty/util/URIUtil.java jetty-webapp/pom.xml jetty-websocket/pom.xml jetty-websocket/src/main/java/org/eclipse/jetty/websocket/DeflateFrameExtension.java jetty-websocket/src/main/java/org/eclipse/jetty/websocket/WebSocketConnectionD00.java jetty-websocket/src/main/java/org/eclipse/jetty/websocket/WebSocketHandler.java jetty-websocket/src/test/java/org/eclipse/jetty/websocket/SafariWebsocketDraft0Test.java jetty-websocket/src/test/java/org/eclipse/jetty/websocket/WebSocketServletRFCTest.java jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/helper/SafariD00.java jetty-xml/pom.xml jetty-xml/src/main/java/org/eclipse/jetty/xml/XmlConfiguration.java jetty-xml/src/test/java/org/eclipse/jetty/xml/XmlConfigurationTest.java pom.xml test-continuation/pom.xml test-jetty-nested/pom.xml test-jetty-servlet/pom.xml test-jetty-servlet/src/main/java/Jetty400Repro.java test-jetty-servlet/src/main/java/org/eclipse/jetty/testing/HttpTester.java test-jetty-servlet/src/test/java/org/eclipse/jetty/testing/HttpTesterTest.java test-jetty-webapp/pom.xml tests/pom.xml tests/test-integration/pom.xml tests/test-loginservice/pom.xml tests/test-sessions/pom.xml tests/test-sessions/test-hash-sessions/pom.xml tests/test-sessions/test-jdbc-sessions/pom.xml tests/test-sessions/test-sessions-common/pom.xml tests/test-webapps/pom.xml tests/test-webapps/test-webapp-rfc2616/pom.xml
This commit is contained in:
commit
154a926b1b
|
@ -38,3 +38,4 @@ target/
|
|||
|
||||
#maven
|
||||
*.versionsBackup
|
||||
*.releaseBackup
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
==============================================================
|
||||
Jetty Web Container
|
||||
Copyright 1995-2009 Mort Bay Consulting Pty Ltd
|
||||
2009-2012 Webtide LLC
|
||||
2011-2012 Intalio Inc
|
||||
Copyright 1995-2012 Mort Bay Consulting Pty Ltd.
|
||||
==============================================================
|
||||
|
||||
The Jetty Web Container is Copyright Mort Bay Consulting Pty Ltd
|
||||
|
|
13
README.txt
13
README.txt
|
@ -3,8 +3,8 @@ This is a source checkout of the Jetty webserver.
|
|||
|
||||
To build, use:
|
||||
|
||||
mvn install
|
||||
|
||||
mvn clean install
|
||||
|
||||
The jetty distribution will be built in
|
||||
|
||||
jetty-distribution/target/distribution
|
||||
|
@ -12,8 +12,11 @@ The jetty distribution will be built in
|
|||
The first build may take a long time as Maven downloads all the
|
||||
dependencies.
|
||||
|
||||
The tests do a lot of stress testing, and on some machines it is
|
||||
The tests do a lot of stress testing, and on some machines it is
|
||||
necessary to set the file descriptor limit to greater than 2048
|
||||
for the tests to all pass successfully.
|
||||
for the tests to all pass successfully.
|
||||
|
||||
Bypass tests by building with -Dmaven.test.skip=true but note
|
||||
that this will not produce some test jars that are leveraged
|
||||
in other places in the build.
|
||||
|
||||
Bypass tests by building with -Dmaven.test.skip=true but note that this will not produce some test jars that are leveraged in other places in the build.
|
||||
|
|
150
VERSION.txt
150
VERSION.txt
|
@ -1,4 +1,146 @@
|
|||
jetty-8.1.1-SNAPSHOT
|
||||
jetty-8.1.6-SNAPSHOT
|
||||
|
||||
jetty-8.1.5.v20120716 - 16 July 2012
|
||||
+ 376717 Balancer Servlet with round robin support, contribution, added
|
||||
missing license
|
||||
+ 379250 Server is added to shutdown hook twice
|
||||
+ 380866 maxIdleTime set to 0 after session migration
|
||||
+ 381399 Unable to stop a jetty instance that has not finished starting
|
||||
+ 381401 Print log warning when stop attempt made with incorrect STOP.KEY
|
||||
+ 381402 Make ContextHandler take set of protected directories
|
||||
+ 381521 set Vary:Accept-Encoding header for content that might be compressed
|
||||
+ 381639 CrossOriginFilter does not support Access-Control-Expose-Headers.
|
||||
+ 381712 Support all declared servlets that implement
|
||||
org.apache.jasper.servlet.JspServlet
|
||||
+ 381825 leave URI params in forwarded requestURI
|
||||
+ 381876 Monitor should wait for child to finish before exiting.
|
||||
+ 382343 Jetty XML support for Map is broken.
|
||||
+ 383251 500 for SocketExceptions
|
||||
+ 383881 WebSocketHandler sets request as handled
|
||||
+ 384254 revert change to writable when not dispatched
|
||||
+ 384280 Implement preliminary ServletRegistrations
|
||||
+ 384847 CrossOriginFilter is not working.
|
||||
+ 384896 JDBCSessionManager fails to load existing sessions on oracle when
|
||||
contextPath is /
|
||||
+ 384980 Jetty client unable to recover from Time outs when connection count
|
||||
per address hits max.
|
||||
+ 385138 add getter for session path and max cookie age that seemed to
|
||||
disappear in a merge long ago
|
||||
+ JETTY-1523 It is imposible to map servlet to "/" using
|
||||
WebApplicationInitializer
|
||||
+ JETTY-1525 Show handle status in response debug message
|
||||
+ JETTY-1530 refine search control on ldap login module
|
||||
|
||||
jetty-8.1.4.v20120524 - 24 May 2012
|
||||
+ 367608 ignore the aysncrequestreadtest as it is known to fail and is waiting
|
||||
for a fix
|
||||
+ 371853 Support bundleentry: protocol for webapp embedded as directory in
|
||||
osgi bundle
|
||||
+ 373620 Add ch.qos.logback.access.jetty to the Import-Package for
|
||||
jetty-osgi-boot-logback bundle
|
||||
+ 376152 apply context resources recursively
|
||||
+ 376801 Make JAAS login modules useable without jetty infrastructure
|
||||
+ 377323 Request#getParts() throws ServletException when it should be throwing
|
||||
IllegalStateException
|
||||
+ 377391 Manifest updates to jetty-osgi-boot-logback
|
||||
+ 377492 NPE if jsp taglibs bundle not deployed
|
||||
+ 377550 set charset when content type is set
|
||||
+ 377587 ConnectHandler write will block on partial write
|
||||
+ 377610 New session not timed out if an old session is invalidated in scope
|
||||
of same request
|
||||
+ 377709 Support for RequestParameterCallback missing
|
||||
+ 378242 Re-extract war on restart if incomplete extraction
|
||||
+ 378273 Remove default Bundle-Localization header
|
||||
+ 378487 Null out contextPath on Request.recycle
|
||||
+ 379015 Use factored jetty xml config files for defaults
|
||||
+ 379046 avoid closing idle connections from selector thread
|
||||
+ 379089 DefaultServlet ignores its resourceBase and uses context's
|
||||
ResourceCollection when listing diretories
|
||||
+ 379194 ProxyServlet enhancement to enable easy creation of alternative
|
||||
HttpClient implementations
|
||||
+ 379909 FormAuthenticator Rembers only the URL of first Request before
|
||||
authentication
|
||||
+ 380034 last modified times taken from JarEntry for JarFile resources
|
||||
+ 380212 Clear buffer if parsing fails due to full buffer
|
||||
+ 380222 JettyPolicyRuntimeTest failure
|
||||
|
||||
jetty-8.1.3.v20120416 - 16 April 2012
|
||||
+ 349110 MultiPartFilter records the content-type in request params
|
||||
+ 367172 Remove detection for slf4j NOPLogger
|
||||
+ 372678 Embedded Examples need updates for new LoginService requirement
|
||||
+ 373269 Make ServletHandler.notFound() method impl do nothing - override to
|
||||
send back 404.
|
||||
+ 373421 address potential race condition related to the nonce queue removing
|
||||
the same nonce twice
|
||||
+ 373952 bind called too frequently on refresh
|
||||
+ 374018 correctly handle requestperminuted underflow
|
||||
+ 374152 jetty-all-server MANIFEST contains wrong import:
|
||||
javax.servlet.annotation;version="[2.6,3)"
|
||||
+ 374252 SslConnection.onClose() does not forward to nested connection.
|
||||
+ 374258 SPDY leaks SSLEngines. Made the test more reliable.
|
||||
+ 374367 NPE in QueuedThreadPool.dump() with early java6 jvms
|
||||
+ 374475 Response.sendRedirect does not encode UTF-8 characters properly
|
||||
+ 374881 Set copyWebInf to false by default
|
||||
+ 374891 enhancement to how ProxyServlet determines the proxy target
|
||||
+ 375009 Filter initialization error will throw MultiException
|
||||
+ 375083 Flow control should take in account window size changes from
|
||||
concurrent SETTINGS
|
||||
+ 375096 If starting a server instance fails in osgi it is cleaned up.
|
||||
+ 375490 NPE with --help on command line
|
||||
+ 375509 Stalled stream stalls other streams or session control frames. Now
|
||||
using a "death pill" instead of a boolean in order to avoid race conditions
|
||||
where DataInfos were read from the queue (but the boolean not updated yet),
|
||||
and viceversa.
|
||||
+ 375594 fixed SSL tests so they are not order dependent
|
||||
+ 375709 Ensure resolveTempDirectory failure does not deadlock; improve error
|
||||
message
|
||||
+ 375906 Part.getHeader method not case insensitive
|
||||
+ 375970 HttpServletRequest.getRemoteAddr() returns null when HTTP is over
|
||||
SPDY.
|
||||
+ 376201 HalfClosed state not handled properly. Addendum to restore previous
|
||||
behavior, where a closed stream was also half closed.
|
||||
+ 376324 <max-file-size> is not respected in <multipart-config>
|
||||
+ JETTY-1495 Ensure dynamic servlet addition does not cause servlets to be
|
||||
inited.
|
||||
+ JETTY-1500 form parameters from multipart request not available via
|
||||
request.getParameter
|
||||
+ JETTY-1504 HttpServletResponseWrapper ignored when using asyncContext?
|
||||
|
||||
jetty-8.1.2.v20120308 - 08 March 2012
|
||||
+ 370387 SafariWebsocketDraft0Test failure during build.
|
||||
+ 371168 Update ClientCrossContextSessionTest
|
||||
+ 372093 handle quotes in Require-Bundle manifest string
|
||||
+ 372457 Big response + slow clients + pipelined requests cause Jetty spinning
|
||||
and eventually closing connections. Added a TODO for a method renaming that
|
||||
will happen in the next major release (to avoid break implementers).
|
||||
+ 372487 JDBCSessionManager does not work with Oracle
|
||||
+ 372806 Command line should accept relative paths for xml config files
|
||||
+ 373037 jetty.server.Response.setContentLength(int) should not close a Writer
|
||||
when length=0
|
||||
+ 373162 add improved implementation for getParameterMap(), needs a test
|
||||
though and the existing setup doesn't seem like it would easily support the
|
||||
needed test so need to do that still
|
||||
+ 373306 Set default user agent extraction pattern for UserAgentFilter
|
||||
+ 373567 cert validation issue with ocsp and crldp always being enabled when
|
||||
validating turned on fixed
|
||||
+ 373603 NullPointer in WebServletAnnotation
|
||||
+ JETTY-1409 GzipFilter will double-compress application/x-gzip content
|
||||
+ JETTY-1489 WebAppProvider attempts to deploy .svn folder
|
||||
+ JETTY-1494 .
|
||||
|
||||
jetty-8.1.1.v20120215 - 15 February 2012
|
||||
+ 369121 simplified test
|
||||
+ 370120 jvm arguments added via start.ini and --exec are missing spaces
|
||||
+ 370137 SslContextFactory does not respect order for
|
||||
[included|excluded]Protocols() and [included|excluded]CipherSuites().
|
||||
+ 370368 resolve stack overflow in mongo db session manager
|
||||
+ 370386 Remove META-INF from jetty distro
|
||||
+ 371040 nosqlsession needs to call correct super contructor for new sessions
|
||||
+ 371041 valid was not being set to new mongo db sessions, and the call to
|
||||
mongodb api was wrong in isIdInUse
|
||||
+ 371162 NPE protection for nested security handlers
|
||||
+ JETTY-1484 Add option for HashSessionManager to delete session files if it
|
||||
can't restore them
|
||||
|
||||
jetty-8.1.0.v20120127 - 27 January 2012
|
||||
+ 368773 allow authentication to be set by non securityHandler handlers
|
||||
|
@ -1178,7 +1320,7 @@ jetty-7.0.2.RC0
|
|||
+ Added IPAccessHandler
|
||||
+ Updated Servlet3Continuation to final 3.0.20100224
|
||||
+ 305997 Coalesce buffers in ChannelEndPoint.flush()
|
||||
+ 306028 Enable TCP_NODELAY by default in client connectors <<<<<<< HEAD
|
||||
+ 306028 Enable TCP_NODELAY by default in client connectors
|
||||
|
||||
jetty-8.0.0.M0 - 28 February 2010
|
||||
+ Updated servlet 3.0 spec 20100224
|
||||
|
@ -1186,10 +1328,6 @@ jetty-8.0.0.M0 - 28 February 2010
|
|||
+ Updated to cometd 1.0.1
|
||||
|
||||
jetty-7.0.1.v20091125 - 25 November 2009
|
||||
+ =======
|
||||
|
||||
jetty-7.0.1.v20091125 - 25 November 2009
|
||||
+ >>>>>>> origin/master
|
||||
+ 274251 DefaultServlet supports exact match mode.
|
||||
+ 288401 HttpExchange.cancel() Method Unimplemented
|
||||
+ 289027 deobfuscate HttpClient SSL passwords
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>example-async-rest</artifactId>
|
||||
<version>9.0.0-SNAPSHOT</version>
|
||||
<version>8.1.6-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.eclipse.jetty.example-async-rest</groupId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>example-async-rest</artifactId>
|
||||
<version>9.0.0-SNAPSHOT</version>
|
||||
<version>8.1.6-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.eclipse.jetty.example-async-rest</groupId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.0.0-SNAPSHOT</version>
|
||||
<version>8.1.6-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.0.0-SNAPSHOT</version>
|
||||
<version>8.1.6-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>example-jetty-embedded</artifactId>
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.embedded;
|
||||
//========================================================================
|
||||
//Copyright (c) 2006-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import org.eclipse.jetty.server.Server;
|
||||
import org.eclipse.jetty.util.resource.Resource;
|
||||
|
|
|
@ -29,7 +29,11 @@ public class OneWebApp
|
|||
server.setConnectors(new Connector[]
|
||||
{ connector });
|
||||
|
||||
String war = args.length > 0?args[0]: "../test-jetty-webapp/target/test-jetty-webapp-" + Server.getVersion();
|
||||
|
||||
//If you're running this from inside Eclipse, then Server.getVersion will not provide
|
||||
//the correct number as there is no manifest. Use the command line instead to provide the path to the
|
||||
//test webapp
|
||||
String war = args.length > 0?args[0]: "../test-jetty-webapp/target/test-jetty-webapp-"+Server.getVersion();
|
||||
String path = args.length > 1?args[1]:"/";
|
||||
|
||||
System.err.println(war + " " + path);
|
||||
|
@ -37,6 +41,15 @@ public class OneWebApp
|
|||
WebAppContext webapp = new WebAppContext();
|
||||
webapp.setContextPath(path);
|
||||
webapp.setWar(war);
|
||||
|
||||
//If the webapp contains security constraints, you will need to configure a LoginService
|
||||
if (war.contains("test-jetty-webapp"))
|
||||
{
|
||||
org.eclipse.jetty.security.HashLoginService loginService = new org.eclipse.jetty.security.HashLoginService();
|
||||
loginService.setName("Test Realm");
|
||||
loginService.setConfig("src/test/resources/realm.properties");
|
||||
webapp.getSecurityHandler().setLoginService(loginService);
|
||||
}
|
||||
|
||||
server.setHandler(webapp);
|
||||
|
||||
|
|
|
@ -2,10 +2,9 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.aggregate</groupId>
|
||||
<artifactId>jetty-aggregate-project</artifactId>
|
||||
<version>9.0.0-SNAPSHOT</version>
|
||||
<version>8.1.6-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.eclipse.jetty.aggregate</groupId>
|
||||
<artifactId>jetty-all-server</artifactId>
|
||||
<name>Jetty :: Aggregate :: All Server</name>
|
||||
<properties>
|
||||
|
@ -80,6 +79,8 @@
|
|||
!org.eclipse.jetty*,
|
||||
javax.annotation;version="1.0.0";resolution:=optional,
|
||||
javax.servlet;version="2.6.0",
|
||||
javax.servlet.annotation;version="2.6.0",
|
||||
javax.servlet.descriptor;version="2.6.0",
|
||||
javax.servlet.http;version="2.6.0",
|
||||
javax.mail;version="1.4.0";resolution:=optional,
|
||||
javax.mail.event;version="1.4.0";resolution:=optional,
|
||||
|
@ -114,7 +115,7 @@
|
|||
</plugins>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-deploy</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.aggregate</groupId>
|
||||
<artifactId>jetty-aggregate-project</artifactId>
|
||||
<version>9.0.0-SNAPSHOT</version>
|
||||
<version>8.1.6-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-all</artifactId>
|
||||
|
@ -37,7 +37,7 @@
|
|||
<configuration>
|
||||
<classifier>sources</classifier>
|
||||
<includes>**/*</includes>
|
||||
<excludes>META-INF/**</excludes>
|
||||
<excludes>META-INF/**,**/Servlet3Continuation*,**/Jetty6Continuation*</excludes>
|
||||
<includeGroupIds>org.eclipse.jetty</includeGroupIds>
|
||||
<excludeArtifactIds>javax</excludeArtifactIds>
|
||||
<excludeGroupIds>javax,org.eclipse.jetty.orbit</excludeGroupIds>
|
||||
|
@ -92,7 +92,7 @@
|
|||
</plugins>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-client</artifactId>
|
||||
|
|
|
@ -2,10 +2,9 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.aggregate</groupId>
|
||||
<artifactId>jetty-aggregate-project</artifactId>
|
||||
<version>9.0.0-SNAPSHOT</version>
|
||||
<version>8.1.6-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.eclipse.jetty.aggregate</groupId>
|
||||
<artifactId>jetty-client</artifactId>
|
||||
<name>Jetty :: Aggregate :: HTTP Client</name>
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.aggregate</groupId>
|
||||
<artifactId>jetty-aggregate-project</artifactId>
|
||||
<version>9.0.0-SNAPSHOT</version>
|
||||
<version>8.1.6-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-plus</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.aggregate</groupId>
|
||||
<artifactId>jetty-aggregate-project</artifactId>
|
||||
<version>9.0.0-SNAPSHOT</version>
|
||||
<version>8.1.6-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-server</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.aggregate</groupId>
|
||||
<artifactId>jetty-aggregate-project</artifactId>
|
||||
<version>9.0.0-SNAPSHOT</version>
|
||||
<version>8.1.6-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-servlet</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.aggregate</groupId>
|
||||
<artifactId>jetty-aggregate-project</artifactId>
|
||||
<version>9.0.0-SNAPSHOT</version>
|
||||
<version>8.1.6-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-webapp</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty.aggregate</groupId>
|
||||
<artifactId>jetty-aggregate-project</artifactId>
|
||||
<version>9.0.0-SNAPSHOT</version>
|
||||
<version>8.1.6-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-websocket</artifactId>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.0.0-SNAPSHOT</version>
|
||||
<version>8.1.6-SNAPSHOT</version>
|
||||
</parent>
|
||||
<groupId>org.eclipse.jetty.aggregate</groupId>
|
||||
<artifactId>jetty-aggregate-project</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.0.0-SNAPSHOT</version>
|
||||
<version>8.1.6-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-ajp</artifactId>
|
||||
|
|
|
@ -36,10 +36,10 @@ public class Ajp13SocketConnector extends SocketConnector
|
|||
static boolean __allowShutdown = false;
|
||||
public Ajp13SocketConnector()
|
||||
{
|
||||
super.setRequestHeaderSize(Ajp13Packet.MAX_DATA_SIZE);
|
||||
super.setResponseHeaderSize(Ajp13Packet.MAX_DATA_SIZE);
|
||||
super.setRequestBufferSize(Ajp13Packet.MAX_DATA_SIZE);
|
||||
super.setResponseBufferSize(Ajp13Packet.MAX_DATA_SIZE);
|
||||
super.setRequestHeaderSize(Ajp13Packet.MAX_PACKET_SIZE);
|
||||
super.setResponseHeaderSize(Ajp13Packet.MAX_PACKET_SIZE);
|
||||
super.setRequestBufferSize(Ajp13Packet.MAX_PACKET_SIZE);
|
||||
super.setResponseBufferSize(Ajp13Packet.MAX_PACKET_SIZE);
|
||||
// IN AJP protocol the socket stay open, so
|
||||
// by default the time out is set to 0 seconds
|
||||
super.setMaxIdleTime(0);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.0.0-SNAPSHOT</version>
|
||||
<version>8.1.6-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-annotations</artifactId>
|
||||
|
|
|
@ -16,8 +16,6 @@ package org.eclipse.jetty.annotations;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
|
||||
/**
|
||||
* AnnotationIntrospector
|
||||
*
|
||||
|
@ -35,7 +33,7 @@ public class AnnotationIntrospector
|
|||
*/
|
||||
public interface IntrospectableAnnotationHandler
|
||||
{
|
||||
public void handle(Class clazz);
|
||||
public void handle(Class<?> clazz);
|
||||
}
|
||||
|
||||
|
||||
|
@ -50,7 +48,7 @@ public class AnnotationIntrospector
|
|||
{
|
||||
private boolean _introspectAncestors;
|
||||
|
||||
public abstract void doHandle(Class clazz);
|
||||
public abstract void doHandle(Class<?> clazz);
|
||||
|
||||
|
||||
public AbstractIntrospectableAnnotationHandler(boolean introspectAncestors)
|
||||
|
@ -58,9 +56,9 @@ public class AnnotationIntrospector
|
|||
_introspectAncestors = introspectAncestors;
|
||||
}
|
||||
|
||||
public void handle(Class clazz)
|
||||
public void handle(Class<?> clazz)
|
||||
{
|
||||
Class c = clazz;
|
||||
Class<?> c = clazz;
|
||||
|
||||
//process the whole inheritance hierarchy for the class
|
||||
while (c!=null && (!c.equals(Object.class)))
|
||||
|
@ -79,7 +77,7 @@ public class AnnotationIntrospector
|
|||
_handlers.add(handler);
|
||||
}
|
||||
|
||||
public void introspect (Class clazz)
|
||||
public void introspect (Class<?> clazz)
|
||||
{
|
||||
if (_handlers == null)
|
||||
return;
|
||||
|
|
|
@ -79,7 +79,7 @@ public class MultiPartConfigAnnotationHandler extends AbstractIntrospectableAnno
|
|||
{
|
||||
for (ServletHolder h : holders)
|
||||
{
|
||||
if (h.getClassName().equals(clazz.getName()))
|
||||
if (h.getClassName() != null && h.getClassName().equals(clazz.getName()))
|
||||
{
|
||||
holder = h;
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ public class ResourceAnnotationHandler extends AbstractIntrospectableAnnotationH
|
|||
* environment that will be looked up at runtime. They do
|
||||
* not specify an injection.
|
||||
*/
|
||||
public void doHandle(Class clazz)
|
||||
public void doHandle(Class<?> clazz)
|
||||
{
|
||||
if (Util.isServletType(clazz))
|
||||
{
|
||||
|
@ -65,16 +65,13 @@ public class ResourceAnnotationHandler extends AbstractIntrospectableAnnotationH
|
|||
}
|
||||
}
|
||||
|
||||
public void handleClass (Class clazz)
|
||||
public void handleClass (Class<?> clazz)
|
||||
{
|
||||
Resource resource = (Resource)clazz.getAnnotation(Resource.class);
|
||||
if (resource != null)
|
||||
{
|
||||
String name = resource.name();
|
||||
String mappedName = resource.mappedName();
|
||||
Resource.AuthenticationType auth = resource.authenticationType();
|
||||
Class type = resource.type();
|
||||
boolean shareable = resource.shareable();
|
||||
|
||||
if (name==null || name.trim().equals(""))
|
||||
throw new IllegalStateException ("Class level Resource annotations must contain a name (Common Annotations Spec Section 2.3)");
|
||||
|
@ -92,7 +89,7 @@ public class ResourceAnnotationHandler extends AbstractIntrospectableAnnotationH
|
|||
}
|
||||
}
|
||||
|
||||
public void handleField(Class clazz, Field field)
|
||||
public void handleField(Class<?> clazz, Field field)
|
||||
{
|
||||
Resource resource = (Resource)field.getAnnotation(Resource.class);
|
||||
if (resource != null)
|
||||
|
@ -118,7 +115,7 @@ public class ResourceAnnotationHandler extends AbstractIntrospectableAnnotationH
|
|||
name = (resource.name()!=null && !resource.name().trim().equals("")? resource.name(): name);
|
||||
String mappedName = (resource.mappedName()!=null && !resource.mappedName().trim().equals("")?resource.mappedName():null);
|
||||
//get the type of the Field
|
||||
Class type = field.getType();
|
||||
Class<?> type = field.getType();
|
||||
|
||||
//Servlet Spec 3.0 p. 76
|
||||
//If a descriptor has specified at least 1 injection target for this
|
||||
|
@ -207,7 +204,7 @@ public class ResourceAnnotationHandler extends AbstractIntrospectableAnnotationH
|
|||
* This will generate a JNDI entry, and an Injection to be
|
||||
* processed when an instance of the class is created.
|
||||
*/
|
||||
public void handleMethod(Class clazz, Method method)
|
||||
public void handleMethod(Class<?> clazz, Method method)
|
||||
{
|
||||
|
||||
Resource resource = (Resource)method.getAnnotation(Resource.class);
|
||||
|
@ -265,9 +262,9 @@ public class ResourceAnnotationHandler extends AbstractIntrospectableAnnotationH
|
|||
|
||||
name = (resource.name()!=null && !resource.name().trim().equals("")? resource.name(): name);
|
||||
String mappedName = (resource.mappedName()!=null && !resource.mappedName().trim().equals("")?resource.mappedName():null);
|
||||
Class paramType = method.getParameterTypes()[0];
|
||||
Class<?> paramType = method.getParameterTypes()[0];
|
||||
|
||||
Class resourceType = resource.type();
|
||||
Class<?> resourceType = resource.type();
|
||||
|
||||
//Servlet Spec 3.0 p. 76
|
||||
//If a descriptor has specified at least 1 injection target for this
|
||||
|
|
|
@ -35,7 +35,7 @@ public class ResourcesAnnotationHandler extends AbstractIntrospectableAnnotation
|
|||
_wac = wac;
|
||||
}
|
||||
|
||||
public void doHandle (Class clazz)
|
||||
public void doHandle (Class<?> clazz)
|
||||
{
|
||||
Resources resources = (Resources)clazz.getAnnotation(Resources.class);
|
||||
if (resources != null)
|
||||
|
@ -49,12 +49,8 @@ public class ResourcesAnnotationHandler extends AbstractIntrospectableAnnotation
|
|||
|
||||
for (int j=0;j<resArray.length;j++)
|
||||
{
|
||||
|
||||
String name = resArray[j].name();
|
||||
String mappedName = resArray[j].mappedName();
|
||||
Resource.AuthenticationType auth = resArray[j].authenticationType();
|
||||
Class type = resArray[j].type();
|
||||
boolean shareable = resArray[j].shareable();
|
||||
|
||||
if (name==null || name.trim().equals(""))
|
||||
throw new IllegalStateException ("Class level Resource annotations must contain a name (Common Annotations Spec Section 2.3)");
|
||||
|
|
|
@ -102,7 +102,7 @@ public class RunAsAnnotationHandler extends AbstractIntrospectableAnnotationHand
|
|||
{
|
||||
for (ServletHolder h : holders)
|
||||
{
|
||||
if (h.getClassName().equals(clazz.getName()))
|
||||
if (h.getClassName() != null && h.getClassName().equals(clazz.getName()))
|
||||
{
|
||||
holder = h;
|
||||
}
|
||||
|
|
|
@ -105,9 +105,9 @@ public class ServletContainerInitializerListener implements ServletContextListen
|
|||
}
|
||||
}
|
||||
|
||||
//TODO Email from Jan Luehe 18 August: after all ServletContainerInitializers have been
|
||||
//Email from Jan Luehe 18 August: after all ServletContainerInitializers have been
|
||||
//called, need to check to see if there are any ServletRegistrations remaining
|
||||
//that are "preliminary" and fail the deployment if so.
|
||||
//that are "preliminary" and fail the deployment if so. Implemented in ServletHolder.doStart().
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -245,7 +245,7 @@ public class ServletSecurityAnnotationHandler extends AbstractIntrospectableAnno
|
|||
{
|
||||
//Check the name of the servlet that this mapping applies to, and then find the ServletHolder for it to find it's class
|
||||
ServletHolder holder = _context.getServletHandler().getServlet(mapping.getServletName());
|
||||
if (holder.getClassName().equals(className))
|
||||
if (holder.getClassName() != null && holder.getClassName().equals(className))
|
||||
results.add(mapping);
|
||||
}
|
||||
return results;
|
||||
|
|
|
@ -92,7 +92,7 @@ public class WebServletAnnotation extends DiscoveredAnnotation
|
|||
|
||||
MetaData metaData = _context.getMetaData();
|
||||
|
||||
//Find out if a <servlet> of this type already exists with this name
|
||||
//Find out if a <servlet> already exists with this name
|
||||
ServletHolder[] holders = _context.getServletHandler().getServlets();
|
||||
boolean isNew = true;
|
||||
ServletHolder holder = null;
|
||||
|
@ -100,7 +100,7 @@ public class WebServletAnnotation extends DiscoveredAnnotation
|
|||
{
|
||||
for (ServletHolder h : holders)
|
||||
{
|
||||
if (h.getClassName().equals(clazz.getName()) && h.getName().equals(servletName))
|
||||
if (h.getName() != null && servletName.equals(h.getName()))
|
||||
{
|
||||
holder = h;
|
||||
isNew = false;
|
||||
|
@ -142,11 +142,19 @@ public class WebServletAnnotation extends DiscoveredAnnotation
|
|||
}
|
||||
else
|
||||
{
|
||||
//set the class according to the servlet that is annotated, if it wasn't already
|
||||
//NOTE: this may be considered as "completing" an incomplete servlet registration, and it is
|
||||
//not clear from servlet 3.0 spec whether this is intended, or if only a ServletContext.addServlet() call
|
||||
//can complete it, see http://java.net/jira/browse/SERVLET_SPEC-42
|
||||
if (holder.getClassName() == null)
|
||||
holder.setClassName(clazz.getName());
|
||||
if (holder.getHeldClass() == null)
|
||||
holder.setHeldClass(clazz);
|
||||
|
||||
//check if the existing servlet has each init-param from the annotation
|
||||
//if not, add it
|
||||
for (WebInitParam ip:annotation.initParams())
|
||||
{
|
||||
//if (holder.getInitParameter(ip.name()) == null)
|
||||
if (metaData.getOrigin(servletName+".servlet.init-param"+ip.name())==Origin.NotSet)
|
||||
{
|
||||
holder.setInitParameter(ip.name(), ip.value());
|
||||
|
@ -154,17 +162,53 @@ public class WebServletAnnotation extends DiscoveredAnnotation
|
|||
}
|
||||
}
|
||||
|
||||
//check the url-patterns, if there annotation has a new one, add it
|
||||
ServletMapping[] mappings = _context.getServletHandler().getServletMappings();
|
||||
|
||||
//check the url-patterns
|
||||
//ServletSpec 3.0 p81 If a servlet already has url mappings from a
|
||||
//descriptor the annotation is ignored
|
||||
if (mappings == null && metaData.getOriginDescriptor(servletName+".servlet.mappings") != null)
|
||||
//webxml or fragment descriptor the annotation is ignored. However, we want to be able to
|
||||
//replace mappings that were given in webdefault.xml
|
||||
boolean mappingsExist = false;
|
||||
boolean anyNonDefaults = false;
|
||||
ServletMapping[] allMappings = _context.getServletHandler().getServletMappings();
|
||||
if (allMappings != null)
|
||||
{
|
||||
ServletMapping mapping = new ServletMapping();
|
||||
mapping.setServletName(servletName);
|
||||
mapping.setPathSpecs(LazyList.toStringArray(urlPatternList));
|
||||
_context.getServletHandler().addServletMapping(mapping);
|
||||
for (ServletMapping m:allMappings)
|
||||
{
|
||||
if (m.getServletName() != null && servletName.equals(m.getServletName()))
|
||||
{
|
||||
mappingsExist = true;
|
||||
if (!m.isDefault())
|
||||
{
|
||||
anyNonDefaults = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (anyNonDefaults)
|
||||
return; //if any mappings already set by a descriptor that is not webdefault.xml, we're done
|
||||
|
||||
boolean clash = false;
|
||||
if (mappingsExist)
|
||||
{
|
||||
for (String p:urlPatternList)
|
||||
{
|
||||
ServletMapping m = _context.getServletHandler().getServletMapping(p);
|
||||
if (m != null && !m.isDefault())
|
||||
{
|
||||
//trying to override a servlet-mapping that was added not by webdefault.xml
|
||||
clash = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!mappingsExist || !clash)
|
||||
{
|
||||
ServletMapping m = new ServletMapping();
|
||||
m.setServletName(servletName);
|
||||
m.setPathSpecs(LazyList.toStringArray(urlPatternList));
|
||||
_context.getServletHandler().addServletMapping(m);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.annotations;
|
||||
//========================================================================
|
||||
//Copyright (c) 2006-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
|
|
|
@ -1,22 +1,31 @@
|
|||
package org.eclipse.jetty.annotations.resources;
|
||||
//========================================================================
|
||||
//Copyright (c) 2006-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.naming.Context;
|
||||
import javax.naming.InitialContext;
|
||||
|
||||
import org.eclipse.jetty.annotations.AnnotationIntrospector;
|
||||
import org.eclipse.jetty.annotations.AnnotationParser;
|
||||
import org.eclipse.jetty.annotations.ClassNameResolver;
|
||||
import org.eclipse.jetty.annotations.ResourceAnnotationHandler;
|
||||
import org.eclipse.jetty.annotations.ResourcesAnnotationHandler;
|
||||
import org.eclipse.jetty.plus.annotation.Injection;
|
||||
import org.eclipse.jetty.plus.annotation.InjectionCollection;
|
||||
import org.eclipse.jetty.server.Server;
|
||||
import org.eclipse.jetty.util.resource.Resource;
|
||||
import org.eclipse.jetty.webapp.MetaData;
|
||||
import org.eclipse.jetty.webapp.WebAppContext;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
@ -24,24 +33,39 @@ import static org.junit.Assert.assertNotNull;
|
|||
|
||||
public class TestResourceAnnotations
|
||||
{
|
||||
Object objA=new Integer(1000);
|
||||
Object objB=new Integer(2000);
|
||||
|
||||
private Server server;
|
||||
private WebAppContext wac;
|
||||
private InjectionCollection injections;
|
||||
private Context comp;
|
||||
private Context env;
|
||||
private Object objA = 1000;
|
||||
private Object objB = 2000;
|
||||
|
||||
@Before
|
||||
public void init() throws Exception
|
||||
{
|
||||
server = new Server();
|
||||
wac = new WebAppContext();
|
||||
wac.setServer(server);
|
||||
injections = new InjectionCollection();
|
||||
wac.setAttribute(InjectionCollection.INJECTION_COLLECTION, injections);
|
||||
InitialContext ic = new InitialContext();
|
||||
comp = (Context)ic.lookup("java:comp");
|
||||
env = comp.createSubcontext("env");
|
||||
}
|
||||
|
||||
@After
|
||||
public void destroy() throws Exception
|
||||
{
|
||||
comp.destroySubcontext("env");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testResourceAnnotations ()
|
||||
throws Exception
|
||||
{
|
||||
Server server = new Server();
|
||||
WebAppContext wac = new WebAppContext();
|
||||
wac.setServer(server);
|
||||
InjectionCollection injections = new InjectionCollection();
|
||||
wac.setAttribute(InjectionCollection.INJECTION_COLLECTION, injections);
|
||||
InitialContext ic = new InitialContext();
|
||||
Context comp = (Context)ic.lookup("java:comp");
|
||||
Context env = comp.createSubcontext("env");
|
||||
|
||||
org.eclipse.jetty.plus.jndi.EnvEntry resourceA = new org.eclipse.jetty.plus.jndi.EnvEntry(server, "resA", objA, false);
|
||||
org.eclipse.jetty.plus.jndi.EnvEntry resourceB = new org.eclipse.jetty.plus.jndi.EnvEntry(server, "resB", objB, false);
|
||||
new org.eclipse.jetty.plus.jndi.EnvEntry(server, "resA", objA, false);
|
||||
new org.eclipse.jetty.plus.jndi.EnvEntry(server, "resB", objB, false);
|
||||
|
||||
AnnotationIntrospector parser = new AnnotationIntrospector();
|
||||
ResourceAnnotationHandler handler = new ResourceAnnotationHandler(wac);
|
||||
|
@ -116,32 +140,21 @@ public class TestResourceAnnotations
|
|||
f = ResourceA.class.getDeclaredField("n");
|
||||
f.setAccessible(true);
|
||||
assertEquals(objB, f.get(binst));
|
||||
|
||||
comp.destroySubcontext("env");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Test
|
||||
public void testResourcesAnnotation ()
|
||||
throws Exception
|
||||
{
|
||||
Server server = new Server();
|
||||
WebAppContext wac = new WebAppContext();
|
||||
wac.setServer(server);
|
||||
InjectionCollection injections = new InjectionCollection();
|
||||
wac.setAttribute(InjectionCollection.INJECTION_COLLECTION, injections);
|
||||
InitialContext ic = new InitialContext();
|
||||
Context comp = (Context)ic.lookup("java:comp");
|
||||
Context env = comp.createSubcontext("env");
|
||||
org.eclipse.jetty.plus.jndi.EnvEntry resourceA = new org.eclipse.jetty.plus.jndi.EnvEntry(server, "resA", objA, false);
|
||||
org.eclipse.jetty.plus.jndi.EnvEntry resourceB = new org.eclipse.jetty.plus.jndi.EnvEntry(server, "resB", objB, false);
|
||||
|
||||
new org.eclipse.jetty.plus.jndi.EnvEntry(server, "resA", objA, false);
|
||||
new org.eclipse.jetty.plus.jndi.EnvEntry(server, "resB", objB, false);
|
||||
|
||||
AnnotationIntrospector introspector = new AnnotationIntrospector();
|
||||
ResourcesAnnotationHandler handler = new ResourcesAnnotationHandler(wac);
|
||||
introspector.registerHandler(handler);
|
||||
introspector.introspect(ResourceA.class);
|
||||
introspector.introspect(ResourceB.class);
|
||||
|
||||
|
||||
assertEquals(objA, env.lookup("peach"));
|
||||
assertEquals(objB, env.lookup("pear"));
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.0.0-SNAPSHOT</version>
|
||||
<version>8.1.6-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -171,7 +171,7 @@ public class HttpClient extends AggregateLifeCycle implements HttpBuffers, Attri
|
|||
|
||||
/* ------------------------------------------------------------ */
|
||||
/** Set the ThreadPool.
|
||||
* The threadpool passed is added via {@link #addBean(Object)} so that
|
||||
* The threadpool passed is added via {@link #addBean(Object)} so that
|
||||
* it's lifecycle may be managed as a {@link AggregateLifeCycle}.
|
||||
* @param threadPool the threadPool to set
|
||||
*/
|
||||
|
@ -878,7 +878,7 @@ public class HttpClient extends AggregateLifeCycle implements HttpBuffers, Attri
|
|||
@Deprecated
|
||||
public void setProvider(String provider)
|
||||
{
|
||||
setProvider(provider);
|
||||
_sslContextFactory.setProvider(provider);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
|
|
|
@ -475,10 +475,12 @@ public class HttpDestination implements Dumpable
|
|||
HttpEventListener elistener = (HttpEventListener)constructor.newInstance(this, ex);
|
||||
ex.setEventListener(elistener);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (final Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
throw new IOException("Unable to instantiate registered listener for destination: " + listenerClass);
|
||||
throw new IOException("Unable to instantiate registered listener for destination: " + listenerClass)
|
||||
{
|
||||
{initCause(e);}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -276,6 +276,11 @@ class SelectConnector extends AggregateLifeCycle implements HttpClient.Connector
|
|||
_endp.shutdownOutput();
|
||||
}
|
||||
|
||||
public void dispatch()
|
||||
{
|
||||
_endp.asyncDispatch();
|
||||
}
|
||||
|
||||
public void asyncDispatch()
|
||||
{
|
||||
_endp.asyncDispatch();
|
||||
|
|
|
@ -104,8 +104,7 @@ public class DigestAuthentication implements Authentication
|
|||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -119,8 +118,7 @@ public class DigestAuthentication implements Authentication
|
|||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.client;
|
||||
//========================================================================
|
||||
//Copyright (c) 2006-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.client;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
|
|
|
@ -0,0 +1,191 @@
|
|||
// ========================================================================
|
||||
// Copyright 2012-2012 Mort Bay Consulting Pty. Ltd.
|
||||
// ------------------------------------------------------------------------
|
||||
// All rights reserved. This program and the accompanying materials
|
||||
// are made available under the terms of the Eclipse Public License v1.0
|
||||
// and Apache License v2.0 which accompanies this distribution.
|
||||
// The Eclipse Public License is available at
|
||||
// http://www.eclipse.org/legal/epl-v10.html
|
||||
// The Apache License v2.0 is available at
|
||||
// http://www.opensource.org/licenses/apache2.0.php
|
||||
// You may elect to redistribute this code under either of these licenses.
|
||||
// ========================================================================
|
||||
|
||||
package org.eclipse.jetty.client;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStream;
|
||||
import java.net.ServerSocket;
|
||||
import java.net.Socket;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
public class ExpirationWithLimitedConnectionsTest
|
||||
{
|
||||
@Test
|
||||
public void testExpirationWithMaxConnectionPerAddressReached() throws Exception
|
||||
{
|
||||
final Logger logger = Log.getLogger("org.eclipse.jetty.client");
|
||||
logger.setDebugEnabled(true);
|
||||
|
||||
HttpClient client = new HttpClient();
|
||||
int maxConnectionsPerAddress = 10;
|
||||
client.setMaxConnectionsPerAddress(maxConnectionsPerAddress);
|
||||
long timeout = 1000;
|
||||
client.setTimeout(timeout);
|
||||
client.start();
|
||||
|
||||
final List<Socket> sockets = new CopyOnWriteArrayList<Socket>();
|
||||
final List<Exception> failures = new CopyOnWriteArrayList<Exception>();
|
||||
final AtomicLong processingDelay = new AtomicLong(200);
|
||||
|
||||
final ExecutorService threadPool = Executors.newCachedThreadPool();
|
||||
final ServerSocket server = new ServerSocket(0);
|
||||
threadPool.submit(new Runnable()
|
||||
{
|
||||
public void run()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
try
|
||||
{
|
||||
final Socket socket = server.accept();
|
||||
sockets.add(socket);
|
||||
logger.debug("CONNECTION {}", socket.getRemoteSocketAddress());
|
||||
threadPool.submit(new Runnable()
|
||||
{
|
||||
public void run()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
try
|
||||
{
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(socket.getInputStream(), "UTF-8"));
|
||||
String firstLine = reader.readLine();
|
||||
String line = firstLine;
|
||||
while (line != null)
|
||||
{
|
||||
if (line.length() == 0)
|
||||
break;
|
||||
line = reader.readLine();
|
||||
}
|
||||
|
||||
if (line == null)
|
||||
break;
|
||||
|
||||
long sleep = processingDelay.get();
|
||||
logger.debug("{} {} {} ms", firstLine, socket.getRemoteSocketAddress(), sleep);
|
||||
TimeUnit.MILLISECONDS.sleep(sleep);
|
||||
|
||||
String response = "" +
|
||||
"HTTP/1.1 200 OK\r\n" +
|
||||
"Content-Length: 0\r\n" +
|
||||
"\r\n";
|
||||
OutputStream output = socket.getOutputStream();
|
||||
output.write(response.getBytes("UTF-8"));
|
||||
output.flush();
|
||||
}
|
||||
catch (Exception x)
|
||||
{
|
||||
failures.add(x);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (Exception x)
|
||||
{
|
||||
failures.add(x);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
List<ContentExchange> exchanges = new ArrayList<ContentExchange>();
|
||||
|
||||
final AtomicBoolean firstExpired = new AtomicBoolean();
|
||||
int count = 0;
|
||||
int maxAdditionalRequest = 100;
|
||||
int additionalRequests = 0;
|
||||
while (true)
|
||||
{
|
||||
TimeUnit.MILLISECONDS.sleep(1); // Just avoid being too fast
|
||||
ContentExchange exchange = new ContentExchange(true)
|
||||
{
|
||||
@Override
|
||||
protected void onResponseComplete() throws IOException
|
||||
{
|
||||
logger.debug("{} {} OK", getMethod(), getRequestURI());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onExpire()
|
||||
{
|
||||
logger.debug("{} {} EXPIRED {}", getMethod(), getRequestURI(), this);
|
||||
firstExpired.compareAndSet(false, true);
|
||||
}
|
||||
};
|
||||
exchanges.add(exchange);
|
||||
Address address = new Address("localhost", server.getLocalPort());
|
||||
exchange.setAddress(address);
|
||||
exchange.setMethod("GET");
|
||||
exchange.setRequestURI("/" + count);
|
||||
exchange.setVersion("HTTP/1.1");
|
||||
exchange.setRequestHeader("Host", address.toString());
|
||||
logger.debug("{} {} SENT", exchange.getMethod(), exchange.getRequestURI());
|
||||
client.send(exchange);
|
||||
++count;
|
||||
|
||||
if (processingDelay.get() > 0)
|
||||
{
|
||||
if (client.getDestination(address, false).getConnections() == maxConnectionsPerAddress)
|
||||
{
|
||||
if (firstExpired.get())
|
||||
{
|
||||
++additionalRequests;
|
||||
if (additionalRequests == maxAdditionalRequest)
|
||||
processingDelay.set(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
++additionalRequests;
|
||||
if (additionalRequests == 2 * maxAdditionalRequest)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (ContentExchange exchange : exchanges)
|
||||
{
|
||||
int status = exchange.waitForDone();
|
||||
Assert.assertTrue(status == HttpExchange.STATUS_COMPLETED || status == HttpExchange.STATUS_EXPIRED);
|
||||
}
|
||||
|
||||
client.stop();
|
||||
|
||||
Assert.assertTrue(failures.isEmpty());
|
||||
|
||||
for (Socket socket : sockets)
|
||||
socket.close();
|
||||
server.close();
|
||||
|
||||
threadPool.shutdown();
|
||||
threadPool.awaitTermination(5, TimeUnit.SECONDS);
|
||||
}
|
||||
}
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.client;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.client;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import java.net.ServerSocket;
|
||||
import java.net.Socket;
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.client;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
|
|
@ -1,7 +1,18 @@
|
|||
package org.eclipse.jetty.client;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URLEncoder;
|
||||
|
@ -229,7 +240,7 @@ public class ProxyTunnellingTest
|
|||
exchange.setURL("https://localhost:" + serverPort + "/echo?body=" + URLEncoder.encode(body, "UTF-8"));
|
||||
|
||||
httpClient.send(exchange);
|
||||
assertTrue(latch.await(serverConnectTimeout * 2, TimeUnit.MILLISECONDS));
|
||||
assertTrue("Server connect exception should have occurred", latch.await(serverConnectTimeout * 2, TimeUnit.MILLISECONDS));
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.client;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.client;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.client;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.client;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import static org.hamcrest.Matchers.*;
|
||||
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.client;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import java.io.EOFException;
|
||||
import java.io.IOException;
|
||||
|
|
|
@ -39,7 +39,7 @@ import org.eclipse.jetty.util.security.Constraint;
|
|||
import org.eclipse.jetty.util.security.Credential;
|
||||
import org.eclipse.jetty.util.ssl.SslContextFactory;
|
||||
|
||||
public class SslCertSecuredExchangeTest extends ContentExchangeTest
|
||||
public class SslCertSecuredExchangeTest// extends ContentExchangeTest
|
||||
{
|
||||
// certificate is valid until Jan 1, 2050
|
||||
private String _keypath = MavenTestingUtils.getTargetFile("test-policy/validation/jetty-valid.keystore").getAbsolutePath();
|
||||
|
@ -51,7 +51,7 @@ public class SslCertSecuredExchangeTest extends ContentExchangeTest
|
|||
protected void configureServer(Server server)
|
||||
throws Exception
|
||||
{
|
||||
setProtocol("https");
|
||||
//setProtocol("https");
|
||||
|
||||
SslSelectChannelConnector connector = new SslSelectChannelConnector();
|
||||
SslContextFactory cf = connector.getSslContextFactory();
|
||||
|
@ -139,31 +139,31 @@ public class SslCertSecuredExchangeTest extends ContentExchangeTest
|
|||
|
||||
ServletContextHandler root = new ServletContextHandler();
|
||||
root.setContextPath("/");
|
||||
root.setResourceBase(getBasePath());
|
||||
// root.setResourceBase(getBasePath());
|
||||
ServletHolder servletHolder = new ServletHolder( new DefaultServlet() );
|
||||
servletHolder.setInitParameter( "gzip", "true" );
|
||||
root.addServlet( servletHolder, "/*" );
|
||||
|
||||
Handler handler = new TestHandler(getBasePath());
|
||||
// Handler handler = new TestHandler(getBasePath());
|
||||
|
||||
HandlerCollection handlers = new HandlerCollection();
|
||||
handlers.setHandlers(new Handler[]{handler, root});
|
||||
// handlers.setHandlers(new Handler[]{handler, root});
|
||||
security.setHandler(handlers);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureClient(HttpClient client) throws Exception
|
||||
{
|
||||
SslContextFactory cf = client.getSslContextFactory();
|
||||
cf.setValidateCerts(true);
|
||||
cf.setCrlPath(_crlpath);
|
||||
|
||||
cf.setCertAlias("client");
|
||||
cf.setKeyStorePath(_clientpath);
|
||||
cf.setKeyStorePassword(_password);
|
||||
cf.setKeyManagerPassword(_password);
|
||||
|
||||
cf.setTrustStore(_trustpath);
|
||||
cf.setTrustStorePassword(_password);
|
||||
}
|
||||
// @Override
|
||||
// protected void configureClient(HttpClient client) throws Exception
|
||||
// {
|
||||
// SslContextFactory cf = client.getSslContextFactory();
|
||||
// cf.setValidateCerts(true);
|
||||
// cf.setCrlPath(_crlpath);
|
||||
//
|
||||
// cf.setCertAlias("client");
|
||||
// cf.setKeyStorePath(_clientpath);
|
||||
// cf.setKeyStorePassword(_password);
|
||||
// cf.setKeyManagerPassword(_password);
|
||||
//
|
||||
// cf.setTrustStore(_trustpath);
|
||||
// cf.setTrustStorePassword(_password);
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.client;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import org.eclipse.jetty.server.ssl.SslSelectChannelConnector;
|
||||
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.client;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import org.eclipse.jetty.server.ssl.SslSocketConnector;
|
||||
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.client;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.lang.reflect.Constructor;
|
||||
|
@ -17,7 +29,7 @@ import org.eclipse.jetty.toolchain.test.MavenTestingUtils;
|
|||
import org.eclipse.jetty.util.security.CertificateUtils;
|
||||
import org.eclipse.jetty.util.ssl.SslContextFactory;
|
||||
|
||||
public abstract class SslValidationTestBase extends ContentExchangeTest
|
||||
public abstract class SslValidationTestBase //extends ContentExchangeTest
|
||||
{
|
||||
protected static Class<? extends SslConnector> __klass;
|
||||
protected static int __konnector;
|
||||
|
@ -29,70 +41,70 @@ public abstract class SslValidationTestBase extends ContentExchangeTest
|
|||
private String _crlpath = MavenTestingUtils.getTargetFile("test-policy/validation/crlfile.pem").getAbsolutePath();
|
||||
private String _password = "OBF:1wnl1sw01ta01z0f1tae1svy1wml";
|
||||
|
||||
@Override
|
||||
|
||||
protected void configureServer(Server server)
|
||||
throws Exception
|
||||
{
|
||||
setProtocol("https");
|
||||
|
||||
SslContextFactory srvFactory = new SslContextFactory() {
|
||||
@Override
|
||||
protected KeyStore getKeyStore(InputStream storeStream, String storePath, String storeType, String storeProvider, String storePassword) throws Exception
|
||||
{
|
||||
return CertificateUtils.getKeyStore(storeStream, storePath, storeType, storeProvider, storePassword);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Collection<? extends CRL> loadCRL(String crlPath) throws Exception
|
||||
{
|
||||
return CertificateUtils.loadCRL(crlPath);
|
||||
}
|
||||
};
|
||||
srvFactory.setValidateCerts(true);
|
||||
srvFactory.setCrlPath(_crlpath);
|
||||
srvFactory.setNeedClientAuth(true);
|
||||
|
||||
srvFactory.setKeyStorePath(_keypath);
|
||||
srvFactory.setKeyStorePassword(_password);
|
||||
srvFactory.setKeyManagerPassword(_password);
|
||||
|
||||
srvFactory.setTrustStore(_trustpath);
|
||||
srvFactory.setTrustStorePassword(_password);
|
||||
|
||||
Constructor<? extends SslConnector> constructor = __klass.getConstructor(SslContextFactory.class);
|
||||
SslConnector connector = constructor.newInstance(srvFactory);
|
||||
connector.setMaxIdleTime(5000);
|
||||
server.addConnector(connector);
|
||||
|
||||
Handler handler = new TestHandler(getBasePath());
|
||||
|
||||
ServletContextHandler root = new ServletContextHandler();
|
||||
root.setContextPath("/");
|
||||
root.setResourceBase(getBasePath());
|
||||
ServletHolder servletHolder = new ServletHolder( new DefaultServlet() );
|
||||
servletHolder.setInitParameter( "gzip", "true" );
|
||||
root.addServlet( servletHolder, "/*" );
|
||||
|
||||
HandlerCollection handlers = new HandlerCollection();
|
||||
handlers.setHandlers(new Handler[]{handler, root});
|
||||
server.setHandler( handlers );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureClient(HttpClient client)
|
||||
throws Exception
|
||||
{
|
||||
client.setConnectorType(__konnector);
|
||||
|
||||
SslContextFactory cf = client.getSslContextFactory();
|
||||
cf.setValidateCerts(true);
|
||||
cf.setCrlPath(_crlpath);
|
||||
|
||||
cf.setKeyStorePath(_clientpath);
|
||||
cf.setKeyStorePassword(_password);
|
||||
cf.setKeyManagerPassword(_password);
|
||||
|
||||
cf.setTrustStore(_trustpath);
|
||||
cf.setTrustStorePassword(_password);
|
||||
// setProtocol("https");
|
||||
//
|
||||
// SslContextFactory srvFactory = new SslContextFactory() {
|
||||
// @Override
|
||||
// protected KeyStore getKeyStore(InputStream storeStream, String storePath, String storeType, String storeProvider, String storePassword) throws Exception
|
||||
// {
|
||||
// return CertificateUtils.getKeyStore(storeStream, storePath, storeType, storeProvider, storePassword);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// protected Collection<? extends CRL> loadCRL(String crlPath) throws Exception
|
||||
// {
|
||||
// return CertificateUtils.loadCRL(crlPath);
|
||||
// }
|
||||
// };
|
||||
// srvFactory.setValidateCerts(true);
|
||||
// srvFactory.setCrlPath(_crlpath);
|
||||
// srvFactory.setNeedClientAuth(true);
|
||||
//
|
||||
// srvFactory.setKeyStorePath(_keypath);
|
||||
// srvFactory.setKeyStorePassword(_password);
|
||||
// srvFactory.setKeyManagerPassword(_password);
|
||||
//
|
||||
// srvFactory.setTrustStore(_trustpath);
|
||||
// srvFactory.setTrustStorePassword(_password);
|
||||
//
|
||||
// Constructor<? extends SslConnector> constructor = __klass.getConstructor(SslContextFactory.class);
|
||||
// SslConnector connector = constructor.newInstance(srvFactory);
|
||||
// connector.setMaxIdleTime(5000);
|
||||
// server.addConnector(connector);
|
||||
//
|
||||
// Handler handler = new TestHandler(getBasePath());
|
||||
//
|
||||
// ServletContextHandler root = new ServletContextHandler();
|
||||
// root.setContextPath("/");
|
||||
// root.setResourceBase(getBasePath());
|
||||
// ServletHolder servletHolder = new ServletHolder( new DefaultServlet() );
|
||||
// servletHolder.setInitParameter( "gzip", "true" );
|
||||
// root.addServlet( servletHolder, "/*" );
|
||||
//
|
||||
// HandlerCollection handlers = new HandlerCollection();
|
||||
// handlers.setHandlers(new Handler[]{handler, root});
|
||||
// server.setHandler( handlers );
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// protected void configureClient(HttpClient client)
|
||||
// throws Exception
|
||||
// {
|
||||
// client.setConnectorType(__konnector);
|
||||
//
|
||||
// SslContextFactory cf = client.getSslContextFactory();
|
||||
// cf.setValidateCerts(true);
|
||||
// cf.setCrlPath(_crlpath);
|
||||
//
|
||||
// cf.setKeyStorePath(_clientpath);
|
||||
// cf.setKeyStorePassword(_password);
|
||||
// cf.setKeyManagerPassword(_password);
|
||||
//
|
||||
// cf.setTrustStore(_trustpath);
|
||||
// cf.setTrustStorePassword(_password);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.client;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import static org.hamcrest.Matchers.*;
|
||||
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
// ========================================================================
|
||||
// Copyright 2006-2007 Mort Bay Consulting Pty. Ltd.
|
||||
// ------------------------------------------------------------------------
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
// ========================================================================
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
package org.eclipse.jetty.client;
|
||||
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.client.helperClasses;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import org.eclipse.jetty.client.HttpClient;
|
||||
import org.eclipse.jetty.toolchain.test.MavenTestingUtils;
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.client.helperClasses;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import java.io.FileInputStream;
|
||||
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.client.helperClasses;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.client.helperClasses;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import org.eclipse.jetty.client.HttpClient;
|
||||
import org.eclipse.jetty.server.Connector;
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.client.helperClasses;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import org.eclipse.jetty.client.HttpClient;
|
||||
import org.eclipse.jetty.server.Server;
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.client.helperClasses;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import org.eclipse.jetty.client.HttpClient;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.0.0-SNAPSHOT</version>
|
||||
<version>8.1.6-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-continuation</artifactId>
|
||||
|
@ -64,9 +64,9 @@
|
|||
</build>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
<version>3.0.20100224</version>
|
||||
<groupId>org.eclipse.jetty.orbit</groupId>
|
||||
<artifactId>javax.servlet</artifactId>
|
||||
<version>3.0.0.v201112011016</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.continuation;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
|
|
@ -1,5 +1,16 @@
|
|||
|
||||
package org.eclipse.jetty.continuation;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import java.util.EventListener;
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
package org.eclipse.jetty.continuation;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletRequestWrapper;
|
||||
import javax.servlet.ServletResponse;
|
||||
|
@ -36,7 +35,7 @@ public class ContinuationSupport
|
|||
static
|
||||
{
|
||||
boolean servlet3Support=false;
|
||||
Constructor<?>s3cc=null;
|
||||
Constructor<? extends Continuation>s3cc=null;
|
||||
try
|
||||
{
|
||||
boolean servlet3=ServletRequest.class.getMethod("startAsync")!=null;
|
||||
|
@ -52,11 +51,11 @@ public class ContinuationSupport
|
|||
finally
|
||||
{
|
||||
__servlet3=servlet3Support;
|
||||
__newServlet3Continuation=(Constructor<? extends Continuation>)s3cc;
|
||||
__newServlet3Continuation=s3cc;
|
||||
}
|
||||
|
||||
|
||||
boolean jetty6Support=false;
|
||||
Constructor<?>j6cc=null;
|
||||
Constructor<? extends Continuation>j6cc=null;
|
||||
try
|
||||
{
|
||||
Class<?> jetty6ContinuationClass = ContinuationSupport.class.getClassLoader().loadClass("org.mortbay.util.ajax.Continuation");
|
||||
|
@ -73,9 +72,9 @@ public class ContinuationSupport
|
|||
finally
|
||||
{
|
||||
__jetty6=jetty6Support;
|
||||
__newJetty6Continuation=(Constructor<? extends Continuation>)j6cc;
|
||||
__newJetty6Continuation=j6cc;
|
||||
}
|
||||
|
||||
|
||||
Class<?> waiting=null;
|
||||
try
|
||||
{
|
||||
|
@ -93,12 +92,12 @@ public class ContinuationSupport
|
|||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* Get a Continuation. The type of the Continuation returned may
|
||||
* vary depending on the container in which the application is
|
||||
* vary depending on the container in which the application is
|
||||
* deployed. It may be an implementation native to the container (eg
|
||||
* org.eclipse.jetty.server.AsyncContinuation) or one of the utility
|
||||
* implementations provided such as an internal <code>FauxContinuation</code>
|
||||
* or a real implementation like {@link org.eclipse.jetty.continuation.Servlet3Continuation}.
|
||||
* @param request The request
|
||||
* @param request The request
|
||||
* @return a Continuation instance
|
||||
*/
|
||||
public static Continuation getContinuation(ServletRequest request)
|
||||
|
@ -106,10 +105,10 @@ public class ContinuationSupport
|
|||
Continuation continuation = (Continuation) request.getAttribute(Continuation.ATTRIBUTE);
|
||||
if (continuation!=null)
|
||||
return continuation;
|
||||
|
||||
|
||||
while (request instanceof ServletRequestWrapper)
|
||||
request=((ServletRequestWrapper)request).getRequest();
|
||||
|
||||
|
||||
if (__servlet3 )
|
||||
{
|
||||
try
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.continuation;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
|
@ -1,9 +1,20 @@
|
|||
package org.eclipse.jetty.continuation;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.AsyncContext;
|
||||
import javax.servlet.AsyncEvent;
|
||||
import javax.servlet.AsyncListener;
|
||||
|
@ -16,7 +27,7 @@ import javax.servlet.ServletResponseWrapper;
|
|||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* This implementation of Continuation is used by {@link ContinuationSupport}
|
||||
* when it detects that the application has been deployed in a non-jetty Servlet 3
|
||||
* when it detects that the application has been deployed in a non-jetty Servlet 3
|
||||
* server.
|
||||
*/
|
||||
public class Servlet3Continuation implements Continuation
|
||||
|
@ -24,11 +35,11 @@ public class Servlet3Continuation implements Continuation
|
|||
// Exception reused for all continuations
|
||||
// Turn on debug in ContinuationFilter to see real stack trace.
|
||||
private final static ContinuationThrowable __exception = new ContinuationThrowable();
|
||||
|
||||
|
||||
private final ServletRequest _request;
|
||||
private ServletResponse _response;
|
||||
private AsyncContext _context;
|
||||
private List<AsyncListener> _listeners=new ArrayList<AsyncListener>();
|
||||
private List<AsyncListener> _listeners=new ArrayList<AsyncListener>();
|
||||
private volatile boolean _initial=true;
|
||||
private volatile boolean _resumed=false;
|
||||
private volatile boolean _expired=false;
|
||||
|
@ -59,7 +70,6 @@ public class Servlet3Continuation implements Continuation
|
|||
public void onTimeout(AsyncEvent event) throws IOException
|
||||
{
|
||||
_initial=false;
|
||||
System.err.println("Doing dispatch on timed out continuation for "+_request.getAttribute("FOO"));
|
||||
event.getAsyncContext().dispatch();
|
||||
}
|
||||
});
|
||||
|
@ -91,7 +101,7 @@ public class Servlet3Continuation implements Continuation
|
|||
listener.onTimeout(Servlet3Continuation.this);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
if (_context!=null)
|
||||
_context.addListener(wrapped);
|
||||
else
|
||||
|
@ -171,7 +181,7 @@ public class Servlet3Continuation implements Continuation
|
|||
_expired=false;
|
||||
_context=_request.startAsync();
|
||||
_context.setTimeout(_timeoutMs);
|
||||
|
||||
|
||||
for (AsyncListener listener:_listeners)
|
||||
_context.addListener(listener);
|
||||
_listeners.clear();
|
||||
|
@ -184,7 +194,7 @@ public class Servlet3Continuation implements Continuation
|
|||
_expired=false;
|
||||
_context=_request.startAsync();
|
||||
_context.setTimeout(_timeoutMs);
|
||||
|
||||
|
||||
for (AsyncListener listener:_listeners)
|
||||
_context.addListener(listener);
|
||||
_listeners.clear();
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.0.0-SNAPSHOT</version>
|
||||
<version>8.1.6-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-deploy</artifactId>
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.deploy.jmx;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.deploy.providers;
|
||||
//========================================================================
|
||||
//Copyright 2009-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FilenameFilter;
|
||||
|
@ -28,6 +40,9 @@ public class ContextProvider extends ScanningAppProvider
|
|||
if (!dir.exists())
|
||||
return false;
|
||||
String lowername = name.toLowerCase();
|
||||
if (lowername.startsWith("."))
|
||||
return false;
|
||||
|
||||
return (lowername.endsWith(".xml") && !new File(dir,name).isDirectory());
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.deploy.providers;
|
||||
//========================================================================
|
||||
//Copyright 2009-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FilenameFilter;
|
||||
|
@ -50,12 +62,21 @@ public class WebAppProvider extends ScanningAppProvider
|
|||
return false;
|
||||
}
|
||||
|
||||
// is it a directory for an existing war file?
|
||||
if (file.isDirectory() &&
|
||||
(new File(dir,name+".war").exists() ||
|
||||
new File(dir,name+".WAR").exists()))
|
||||
{
|
||||
//ignore hidden files
|
||||
if (lowername.startsWith("."))
|
||||
return false;
|
||||
|
||||
if (file.isDirectory())
|
||||
{
|
||||
// is it a directory for an existing war file?
|
||||
if (new File(dir,name+".war").exists() ||
|
||||
new File(dir,name+".WAR").exists())
|
||||
|
||||
return false;
|
||||
|
||||
//is it a sccs dir?
|
||||
if ("cvs".equals(lowername) || "cvsroot".equals(lowername))
|
||||
return false;
|
||||
}
|
||||
|
||||
// is there a contexts config file
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.deploy;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Set;
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.deploy.graph;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import junit.framework.Assert;
|
||||
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.deploy.providers;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.0.0-SNAPSHOT</version>
|
||||
<version>8.1.6-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>jetty-distribution</artifactId>
|
||||
<name>Jetty :: Distribution Assemblies</name>
|
||||
|
@ -124,7 +124,7 @@
|
|||
</goals>
|
||||
<configuration>
|
||||
<includeGroupIds>org.eclipse.jetty</includeGroupIds>
|
||||
<excludeGroupIds>org.eclipse.jetty.orbit</excludeGroupIds>
|
||||
<excludeGroupIds>org.eclipse.jetty.orbit,org.eclipse.jetty.spdy</excludeGroupIds>
|
||||
<excludeArtifactIds>jetty-all,jetty-start,jetty-monitor,jetty-jsp</excludeArtifactIds>
|
||||
<includeTypes>jar</includeTypes>
|
||||
<outputDirectory>${assembly-directory}/lib</outputDirectory>
|
||||
|
@ -201,20 +201,6 @@
|
|||
<outputDirectory>${assembly-directory}/lib/jsp</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>copy-lib-monitor-deps</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<includeGroupIds>org.eclipse.jetty</includeGroupIds>
|
||||
<includeArtifactIds>jetty-monitor</includeArtifactIds>
|
||||
<includeTypes>jar</includeTypes>
|
||||
<excludeTransitive>true</excludeTransitive>
|
||||
<outputDirectory>${assembly-directory}/lib/monitor</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>unpack-config-deps</id>
|
||||
<phase>generate-resources</phase>
|
||||
|
@ -229,6 +215,20 @@
|
|||
<outputDirectory>${assembly-directory}</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>copy-lib-monitor-deps</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<includeGroupIds>org.eclipse.jetty</includeGroupIds>
|
||||
<includeArtifactIds>jetty-monitor</includeArtifactIds>
|
||||
<includeTypes>jar</includeTypes>
|
||||
<excludeTransitive>true</excludeTransitive>
|
||||
<outputDirectory>${assembly-directory}/lib/monitor</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>unpack-javadoc</id>
|
||||
<phase>generate-resources</phase>
|
||||
|
@ -406,4 +406,92 @@
|
|||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<profiles>
|
||||
<profile>
|
||||
<!-- Modules that are only for JDK7+ builds -->
|
||||
<id>JDK7-plus-modules</id>
|
||||
<activation>
|
||||
<jdk>[1.7,)</jdk>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-lib-spdy-deps</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<includeGroupIds>org.eclipse.jetty.spdy</includeGroupIds>
|
||||
<includeTypes>jar</includeTypes>
|
||||
<outputDirectory>${assembly-directory}/lib/spdy</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>copy-spdy</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>copy</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.eclipse.jetty.spdy</groupId>
|
||||
<artifactId>spdy-jetty-http-webapp</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>war</type>
|
||||
<overWrite>true</overWrite>
|
||||
<includes>**</includes>
|
||||
<outputDirectory>${assembly-directory}/webapps</outputDirectory>
|
||||
<destFileName>spdy.war</destFileName>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>unpack-spdy</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>unpack-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<includeGroupIds>org.eclipse.jetty.spdy</includeGroupIds>
|
||||
<classifier>config</classifier>
|
||||
<failOnMissingClassifierArtifact>false</failOnMissingClassifierArtifact>
|
||||
<excludes>META-INF/**</excludes>
|
||||
<outputDirectory>${assembly-directory}</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.spdy</groupId>
|
||||
<artifactId>spdy-core</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.spdy</groupId>
|
||||
<artifactId>spdy-jetty</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.spdy</groupId>
|
||||
<artifactId>spdy-jetty-http</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty.spdy</groupId>
|
||||
<artifactId>spdy-jetty-http-webapp</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>war</type>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.0.0-SNAPSHOT</version>
|
||||
<version>8.1.6-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-http-spi</artifactId>
|
||||
|
@ -31,14 +31,6 @@
|
|||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
<verbose>false</verbose>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.http.spi;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
|
@ -30,7 +42,6 @@ public class TestSPIServer
|
|||
new HttpHandler()
|
||||
{
|
||||
|
||||
@Override
|
||||
public void handle(HttpExchange exchange) throws IOException
|
||||
{
|
||||
Headers responseHeaders = exchange.getResponseHeaders();
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<parent>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<version>9.0.0-SNAPSHOT</version>
|
||||
<version>8.1.6-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-http</artifactId>
|
||||
|
|
|
@ -898,14 +898,12 @@ public class HttpParser
|
|||
buffer.position(buffer.position()-1);
|
||||
String chars = BufferUtil.toDetailString(buffer);
|
||||
BufferUtil.clear(buffer);
|
||||
throw new IOException(this+" Illegal characters: "+chars);
|
||||
throw new IOException(this+" Extra data after oshut: "+chars);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Request/response line
|
||||
if (_state.ordinal()<State.HEADER.ordinal())
|
||||
if (parseLine(buffer))
|
||||
|
|
|
@ -0,0 +1,344 @@
|
|||
// ========================================================================
|
||||
// Copyright (c) 2009-2009 Mort Bay Consulting Pty. Ltd.
|
||||
// ------------------------------------------------------------------------
|
||||
// All rights reserved. This program and the accompanying materials
|
||||
// are made available under the terms of the Eclipse Public License v1.0
|
||||
// and Apache License v2.0 which accompanies this distribution.
|
||||
// The Eclipse Public License is available at
|
||||
// http://www.eclipse.org/legal/epl-v10.html
|
||||
// The Apache License v2.0 is available at
|
||||
// http://www.opensource.org/licenses/apache2.0.php
|
||||
// You may elect to redistribute this code under either of these licenses.
|
||||
// ========================================================================
|
||||
|
||||
package org.eclipse.jetty.http.gzip;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.zip.DeflaterOutputStream;
|
||||
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.eclipse.jetty.util.ByteArrayOutputStream2;
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* Skeletal implementation of a CompressedStream. This class adds compression features to a ServletOutputStream and takes care of setting response headers, etc.
|
||||
* Major work and configuration is done here. Subclasses using different kinds of compression only have to implement the abstract methods doCompress() and
|
||||
* setContentEncoding() using the desired compression and setting the appropriate Content-Encoding header string.
|
||||
*/
|
||||
public abstract class AbstractCompressedStream extends ServletOutputStream
|
||||
{
|
||||
private final String _encoding;
|
||||
protected HttpServletRequest _request;
|
||||
protected HttpServletResponse _response;
|
||||
protected OutputStream _out;
|
||||
protected ByteArrayOutputStream2 _bOut;
|
||||
protected DeflaterOutputStream _compressedOutputStream;
|
||||
protected boolean _closed;
|
||||
protected int _bufferSize;
|
||||
protected int _minCompressSize;
|
||||
protected long _contentLength;
|
||||
protected boolean _doNotCompress;
|
||||
|
||||
/**
|
||||
* Instantiates a new compressed stream.
|
||||
*
|
||||
* @param request
|
||||
* the request
|
||||
* @param response
|
||||
* the response
|
||||
* @param contentLength
|
||||
* the content length
|
||||
* @param bufferSize
|
||||
* the buffer size
|
||||
* @param minCompressSize
|
||||
* the min compress size
|
||||
* @throws IOException
|
||||
* Signals that an I/O exception has occurred.
|
||||
*/
|
||||
public AbstractCompressedStream(String encoding,HttpServletRequest request, HttpServletResponse response, long contentLength, int bufferSize, int minCompressSize)
|
||||
throws IOException
|
||||
{
|
||||
_encoding=encoding;
|
||||
_request = request;
|
||||
_response = response;
|
||||
_contentLength = contentLength;
|
||||
_bufferSize = bufferSize;
|
||||
_minCompressSize = minCompressSize;
|
||||
if (minCompressSize == 0)
|
||||
doCompress();
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset buffer.
|
||||
*/
|
||||
public void resetBuffer()
|
||||
{
|
||||
if (_response.isCommitted())
|
||||
throw new IllegalStateException("Committed");
|
||||
_closed = false;
|
||||
_out = null;
|
||||
_bOut = null;
|
||||
if (_compressedOutputStream != null)
|
||||
_response.setHeader("Content-Encoding",null);
|
||||
_compressedOutputStream = null;
|
||||
_doNotCompress = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the content length.
|
||||
*
|
||||
* @param length
|
||||
* the new content length
|
||||
*/
|
||||
public void setContentLength(long length)
|
||||
{
|
||||
_contentLength = length;
|
||||
if (_doNotCompress && length >= 0)
|
||||
{
|
||||
if (_contentLength < Integer.MAX_VALUE)
|
||||
_response.setContentLength((int)_contentLength);
|
||||
else
|
||||
_response.setHeader("Content-Length",Long.toString(_contentLength));
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @see java.io.OutputStream#flush()
|
||||
*/
|
||||
@Override
|
||||
public void flush() throws IOException
|
||||
{
|
||||
if (_out == null || _bOut != null)
|
||||
{
|
||||
if (_contentLength > 0 && _contentLength < _minCompressSize)
|
||||
doNotCompress();
|
||||
else
|
||||
doCompress();
|
||||
}
|
||||
|
||||
_out.flush();
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @see java.io.OutputStream#close()
|
||||
*/
|
||||
@Override
|
||||
public void close() throws IOException
|
||||
{
|
||||
if (_closed)
|
||||
return;
|
||||
|
||||
if (_request.getAttribute("javax.servlet.include.request_uri") != null)
|
||||
flush();
|
||||
else
|
||||
{
|
||||
if (_bOut != null)
|
||||
{
|
||||
if (_contentLength < 0)
|
||||
_contentLength = _bOut.getCount();
|
||||
if (_contentLength < _minCompressSize)
|
||||
doNotCompress();
|
||||
else
|
||||
doCompress();
|
||||
}
|
||||
else if (_out == null)
|
||||
{
|
||||
doNotCompress();
|
||||
}
|
||||
|
||||
if (_compressedOutputStream != null)
|
||||
_compressedOutputStream.close();
|
||||
else
|
||||
_out.close();
|
||||
_closed = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Finish.
|
||||
*
|
||||
* @throws IOException
|
||||
* Signals that an I/O exception has occurred.
|
||||
*/
|
||||
public void finish() throws IOException
|
||||
{
|
||||
if (!_closed)
|
||||
{
|
||||
if (_out == null || _bOut != null)
|
||||
{
|
||||
if (_contentLength > 0 && _contentLength < _minCompressSize)
|
||||
doNotCompress();
|
||||
else
|
||||
doCompress();
|
||||
}
|
||||
|
||||
if (_compressedOutputStream != null && !_closed)
|
||||
{
|
||||
_closed = true;
|
||||
_compressedOutputStream.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @see java.io.OutputStream#write(int)
|
||||
*/
|
||||
@Override
|
||||
public void write(int b) throws IOException
|
||||
{
|
||||
checkOut(1);
|
||||
_out.write(b);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @see java.io.OutputStream#write(byte[])
|
||||
*/
|
||||
@Override
|
||||
public void write(byte b[]) throws IOException
|
||||
{
|
||||
checkOut(b.length);
|
||||
_out.write(b);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @see java.io.OutputStream#write(byte[], int, int)
|
||||
*/
|
||||
@Override
|
||||
public void write(byte b[], int off, int len) throws IOException
|
||||
{
|
||||
checkOut(len);
|
||||
_out.write(b,off,len);
|
||||
}
|
||||
|
||||
/**
|
||||
* Do compress.
|
||||
*
|
||||
* @throws IOException Signals that an I/O exception has occurred.
|
||||
*/
|
||||
public void doCompress() throws IOException
|
||||
{
|
||||
if (_compressedOutputStream==null)
|
||||
{
|
||||
if (_response.isCommitted())
|
||||
throw new IllegalStateException();
|
||||
|
||||
setHeader("Content-Encoding", _encoding);
|
||||
if (_response.containsHeader("Content-Encoding"))
|
||||
{
|
||||
_out=_compressedOutputStream=createStream();
|
||||
|
||||
if (_bOut!=null)
|
||||
{
|
||||
_out.write(_bOut.getBuf(),0,_bOut.getCount());
|
||||
_bOut=null;
|
||||
}
|
||||
}
|
||||
else
|
||||
doNotCompress();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Do not compress.
|
||||
*
|
||||
* @throws IOException
|
||||
* Signals that an I/O exception has occurred.
|
||||
*/
|
||||
public void doNotCompress() throws IOException
|
||||
{
|
||||
if (_compressedOutputStream != null)
|
||||
throw new IllegalStateException("Compressed output stream is already assigned.");
|
||||
if (_out == null || _bOut != null)
|
||||
{
|
||||
_doNotCompress = true;
|
||||
|
||||
_out = _response.getOutputStream();
|
||||
setContentLength(_contentLength);
|
||||
|
||||
if (_bOut != null)
|
||||
_out.write(_bOut.getBuf(),0,_bOut.getCount());
|
||||
_bOut = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check out.
|
||||
*
|
||||
* @param length
|
||||
* the length
|
||||
* @throws IOException
|
||||
* Signals that an I/O exception has occurred.
|
||||
*/
|
||||
private void checkOut(int length) throws IOException
|
||||
{
|
||||
if (_closed)
|
||||
throw new IOException("CLOSED");
|
||||
|
||||
if (_out == null)
|
||||
{
|
||||
if (_response.isCommitted() || (_contentLength >= 0 && _contentLength < _minCompressSize))
|
||||
doNotCompress();
|
||||
else if (length > _minCompressSize)
|
||||
doCompress();
|
||||
else
|
||||
_out = _bOut = new ByteArrayOutputStream2(_bufferSize);
|
||||
}
|
||||
else if (_bOut != null)
|
||||
{
|
||||
if (_response.isCommitted() || (_contentLength >= 0 && _contentLength < _minCompressSize))
|
||||
doNotCompress();
|
||||
else if (length >= (_bOut.getBuf().length - _bOut.getCount()))
|
||||
doCompress();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.http.gzip.CompressedStream#getOutputStream()
|
||||
*/
|
||||
public OutputStream getOutputStream()
|
||||
{
|
||||
return _out;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.eclipse.jetty.http.gzip.CompressedStream#isClosed()
|
||||
*/
|
||||
public boolean isClosed()
|
||||
{
|
||||
return _closed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows derived implementations to replace PrintWriter implementation.
|
||||
*/
|
||||
protected PrintWriter newWriter(OutputStream out, String encoding) throws UnsupportedEncodingException
|
||||
{
|
||||
return encoding == null?new PrintWriter(out):new PrintWriter(new OutputStreamWriter(out,encoding));
|
||||
}
|
||||
|
||||
protected void setHeader(String name,String value)
|
||||
{
|
||||
_response.setHeader(name, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the stream fitting to the underlying compression type.
|
||||
*
|
||||
* @throws IOException
|
||||
* Signals that an I/O exception has occurred.
|
||||
*/
|
||||
protected abstract DeflaterOutputStream createStream() throws IOException;
|
||||
|
||||
}
|
|
@ -1,17 +1,16 @@
|
|||
// ========================================================================
|
||||
// Copyright (c) Webtide LLC
|
||||
// Copyright (c) 2009-2009 Mort Bay Consulting Pty. Ltd.
|
||||
// ------------------------------------------------------------------------
|
||||
// All rights reserved. This program and the accompanying materials
|
||||
// are made available under the terms of the Eclipse Public License v1.0
|
||||
// and Apache License v2.0 which accompanies this distribution.
|
||||
// The Eclipse Public License is available at
|
||||
// The Eclipse Public License is available at
|
||||
// http://www.eclipse.org/legal/epl-v10.html
|
||||
// The Apache License v2.0 is available at
|
||||
// http://www.opensource.org/licenses/apache2.0.php
|
||||
// You may elect to redistribute this code under either of these licenses.
|
||||
// You may elect to redistribute this code under either of these licenses.
|
||||
// ========================================================================
|
||||
|
||||
|
||||
package org.eclipse.jetty.http.gzip;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -28,42 +27,34 @@ import javax.servlet.http.HttpServletResponseWrapper;
|
|||
|
||||
import org.eclipse.jetty.util.StringUtil;
|
||||
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/*------------------------------------------------------------ */
|
||||
/**
|
||||
*/
|
||||
public class GzipResponseWrapper extends HttpServletResponseWrapper
|
||||
public abstract class CompressedResponseWrapper extends HttpServletResponseWrapper
|
||||
{
|
||||
|
||||
public static final int DEFAULT_BUFFER_SIZE = 8192;
|
||||
public static final int DEFAULT_MIN_GZIP_SIZE = 256;
|
||||
|
||||
private final HttpServletRequest _request;
|
||||
public static final int DEFAULT_MIN_COMPRESS_SIZE = 256;
|
||||
|
||||
private Set<String> _mimeTypes;
|
||||
private int _bufferSize=DEFAULT_BUFFER_SIZE;
|
||||
private int _minGzipSize=DEFAULT_MIN_GZIP_SIZE;
|
||||
private int _minCompressSize=DEFAULT_MIN_COMPRESS_SIZE;
|
||||
protected HttpServletRequest _request;
|
||||
|
||||
private PrintWriter _writer;
|
||||
private GzipStream _gzStream;
|
||||
private AbstractCompressedStream _compressedStream;
|
||||
private long _contentLength=-1;
|
||||
private boolean _noGzip;
|
||||
private boolean _noCompression;
|
||||
|
||||
/**
|
||||
* Instantiates a new gzip response wrapper.
|
||||
*
|
||||
* @param request the request
|
||||
* @param response the response
|
||||
*/
|
||||
public GzipResponseWrapper(HttpServletRequest request, HttpServletResponse response)
|
||||
public CompressedResponseWrapper(HttpServletRequest request, HttpServletResponse response)
|
||||
{
|
||||
super(response);
|
||||
_request=request;
|
||||
_request = request;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* Sets the mime types.
|
||||
*
|
||||
* @param mimeTypes the new mime types
|
||||
* @see org.eclipse.jetty.http.gzip.CompressedResponseWrapper#setMimeTypes(java.util.Set)
|
||||
*/
|
||||
public void setMimeTypes(Set<String> mimeTypes)
|
||||
{
|
||||
|
@ -72,7 +63,7 @@ public class GzipResponseWrapper extends HttpServletResponseWrapper
|
|||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @see javax.servlet.ServletResponseWrapper#setBufferSize(int)
|
||||
* @see org.eclipse.jetty.http.gzip.CompressedResponseWrapper#setBufferSize(int)
|
||||
*/
|
||||
@Override
|
||||
public void setBufferSize(int bufferSize)
|
||||
|
@ -82,80 +73,78 @@ public class GzipResponseWrapper extends HttpServletResponseWrapper
|
|||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* Sets the min gzip size.
|
||||
*
|
||||
* @param minGzipSize the new min gzip size
|
||||
* @see org.eclipse.jetty.http.gzip.CompressedResponseWrapper#setMinCompressSize(int)
|
||||
*/
|
||||
public void setMinGzipSize(int minGzipSize)
|
||||
public void setMinCompressSize(int minCompressSize)
|
||||
{
|
||||
_minGzipSize = minGzipSize;
|
||||
_minCompressSize = minCompressSize;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @see javax.servlet.ServletResponseWrapper#setContentType(java.lang.String)
|
||||
* @see org.eclipse.jetty.http.gzip.CompressedResponseWrapper#setContentType(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void setContentType(String ct)
|
||||
{
|
||||
super.setContentType(ct);
|
||||
|
||||
|
||||
if (ct!=null)
|
||||
{
|
||||
int colon=ct.indexOf(";");
|
||||
if (colon>0)
|
||||
ct=ct.substring(0,colon);
|
||||
}
|
||||
|
||||
if ((_gzStream==null || _gzStream._out==null) &&
|
||||
(_mimeTypes==null && "application/gzip".equalsIgnoreCase(ct) ||
|
||||
_mimeTypes!=null && (ct==null||!_mimeTypes.contains(StringUtil.asciiToLowerCase(ct)))))
|
||||
|
||||
if ((_compressedStream==null || _compressedStream.getOutputStream()==null) &&
|
||||
(_mimeTypes==null && ct!=null && ct.contains("gzip") ||
|
||||
_mimeTypes!=null && (ct==null||!_mimeTypes.contains(StringUtil.asciiToLowerCase(ct)))))
|
||||
{
|
||||
noGzip();
|
||||
noCompression();
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @see javax.servlet.http.HttpServletResponseWrapper#setStatus(int, java.lang.String)
|
||||
* @see org.eclipse.jetty.http.gzip.CompressedResponseWrapper#setStatus(int, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void setStatus(int sc, String sm)
|
||||
{
|
||||
super.setStatus(sc,sm);
|
||||
if (sc<200 || sc==204 || sc==205 || sc>=300)
|
||||
noGzip();
|
||||
noCompression();
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @see javax.servlet.http.HttpServletResponseWrapper#setStatus(int)
|
||||
* @see org.eclipse.jetty.http.gzip.CompressedResponseWrapper#setStatus(int)
|
||||
*/
|
||||
@Override
|
||||
public void setStatus(int sc)
|
||||
{
|
||||
super.setStatus(sc);
|
||||
if (sc<200 || sc==204 || sc==205 ||sc>=300)
|
||||
noGzip();
|
||||
if (sc<200 || sc==204 || sc==205 || sc>=300)
|
||||
noCompression();
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @see javax.servlet.ServletResponseWrapper#setContentLength(int)
|
||||
* @see org.eclipse.jetty.http.gzip.CompressedResponseWrapper#setContentLength(int)
|
||||
*/
|
||||
@Override
|
||||
public void setContentLength(int length)
|
||||
{
|
||||
setContentLength((long)length);
|
||||
}
|
||||
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
protected void setContentLength(long length)
|
||||
{
|
||||
_contentLength=length;
|
||||
if (_gzStream!=null)
|
||||
_gzStream.setContentLength(length);
|
||||
else if (_noGzip && _contentLength>=0)
|
||||
if (_compressedStream!=null)
|
||||
_compressedStream.setContentLength(length);
|
||||
else if (_noCompression && _contentLength>=0)
|
||||
{
|
||||
HttpServletResponse response = (HttpServletResponse)getResponse();
|
||||
if(_contentLength<Integer.MAX_VALUE)
|
||||
|
@ -171,7 +160,7 @@ public class GzipResponseWrapper extends HttpServletResponseWrapper
|
|||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @see javax.servlet.http.HttpServletResponseWrapper#addHeader(java.lang.String, java.lang.String)
|
||||
* @see org.eclipse.jetty.http.gzip.CompressedResponseWrapper#addHeader(java.lang.String, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void addHeader(String name, String value)
|
||||
|
@ -179,19 +168,19 @@ public class GzipResponseWrapper extends HttpServletResponseWrapper
|
|||
if ("content-length".equalsIgnoreCase(name))
|
||||
{
|
||||
_contentLength=Long.parseLong(value);
|
||||
if (_gzStream!=null)
|
||||
_gzStream.setContentLength(_contentLength);
|
||||
if (_compressedStream!=null)
|
||||
_compressedStream.setContentLength(_contentLength);
|
||||
}
|
||||
else if ("content-type".equalsIgnoreCase(name))
|
||||
{
|
||||
{
|
||||
setContentType(value);
|
||||
}
|
||||
else if ("content-encoding".equalsIgnoreCase(name))
|
||||
{
|
||||
{
|
||||
super.addHeader(name,value);
|
||||
if (!isCommitted())
|
||||
{
|
||||
noGzip();
|
||||
noCompression();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -200,96 +189,52 @@ public class GzipResponseWrapper extends HttpServletResponseWrapper
|
|||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @see javax.servlet.http.HttpServletResponseWrapper#setHeader(java.lang.String, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void setHeader(String name, String value)
|
||||
{
|
||||
if ("content-length".equalsIgnoreCase(name))
|
||||
{
|
||||
setContentLength(Long.parseLong(value));
|
||||
}
|
||||
else if ("content-type".equalsIgnoreCase(name))
|
||||
{
|
||||
setContentType(value);
|
||||
}
|
||||
else if ("content-encoding".equalsIgnoreCase(name))
|
||||
{
|
||||
super.setHeader(name,value);
|
||||
if (!isCommitted())
|
||||
{
|
||||
noGzip();
|
||||
}
|
||||
}
|
||||
else
|
||||
super.setHeader(name,value);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @see javax.servlet.http.HttpServletResponseWrapper#setIntHeader(java.lang.String, int)
|
||||
*/
|
||||
@Override
|
||||
public void setIntHeader(String name, int value)
|
||||
{
|
||||
if ("content-length".equalsIgnoreCase(name))
|
||||
{
|
||||
_contentLength=value;
|
||||
if (_gzStream!=null)
|
||||
_gzStream.setContentLength(_contentLength);
|
||||
}
|
||||
else
|
||||
super.setIntHeader(name,value);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @see javax.servlet.ServletResponseWrapper#flushBuffer()
|
||||
* @see org.eclipse.jetty.http.gzip.CompressedResponseWrapper#flushBuffer()
|
||||
*/
|
||||
@Override
|
||||
public void flushBuffer() throws IOException
|
||||
{
|
||||
if (_writer!=null)
|
||||
_writer.flush();
|
||||
if (_gzStream!=null)
|
||||
_gzStream.finish();
|
||||
if (_compressedStream!=null)
|
||||
_compressedStream.finish();
|
||||
else
|
||||
getResponse().flushBuffer();
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @see javax.servlet.ServletResponseWrapper#reset()
|
||||
* @see org.eclipse.jetty.http.gzip.CompressedResponseWrapper#reset()
|
||||
*/
|
||||
@Override
|
||||
public void reset()
|
||||
{
|
||||
super.reset();
|
||||
if (_gzStream!=null)
|
||||
_gzStream.resetBuffer();
|
||||
if (_compressedStream!=null)
|
||||
_compressedStream.resetBuffer();
|
||||
_writer=null;
|
||||
_gzStream=null;
|
||||
_noGzip=false;
|
||||
_compressedStream=null;
|
||||
_noCompression=false;
|
||||
_contentLength=-1;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @see javax.servlet.ServletResponseWrapper#resetBuffer()
|
||||
* @see org.eclipse.jetty.http.gzip.CompressedResponseWrapper#resetBuffer()
|
||||
*/
|
||||
@Override
|
||||
public void resetBuffer()
|
||||
{
|
||||
super.resetBuffer();
|
||||
if (_gzStream!=null)
|
||||
_gzStream.resetBuffer();
|
||||
if (_compressedStream!=null)
|
||||
_compressedStream.resetBuffer();
|
||||
_writer=null;
|
||||
_gzStream=null;
|
||||
_compressedStream=null;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @see javax.servlet.http.HttpServletResponseWrapper#sendError(int, java.lang.String)
|
||||
* @see org.eclipse.jetty.http.gzip.CompressedResponseWrapper#sendError(int, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void sendError(int sc, String msg) throws IOException
|
||||
|
@ -300,7 +245,7 @@ public class GzipResponseWrapper extends HttpServletResponseWrapper
|
|||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @see javax.servlet.http.HttpServletResponseWrapper#sendError(int)
|
||||
* @see org.eclipse.jetty.http.gzip.CompressedResponseWrapper#sendError(int)
|
||||
*/
|
||||
@Override
|
||||
public void sendError(int sc) throws IOException
|
||||
|
@ -311,7 +256,7 @@ public class GzipResponseWrapper extends HttpServletResponseWrapper
|
|||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @see javax.servlet.http.HttpServletResponseWrapper#sendRedirect(java.lang.String)
|
||||
* @see org.eclipse.jetty.http.gzip.CompressedResponseWrapper#sendRedirect(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void sendRedirect(String location) throws IOException
|
||||
|
@ -319,66 +264,19 @@ public class GzipResponseWrapper extends HttpServletResponseWrapper
|
|||
resetBuffer();
|
||||
super.sendRedirect(location);
|
||||
}
|
||||
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @see javax.servlet.ServletResponseWrapper#getOutputStream()
|
||||
* @see org.eclipse.jetty.http.gzip.CompressedResponseWrapper#noCompression()
|
||||
*/
|
||||
@Override
|
||||
public ServletOutputStream getOutputStream() throws IOException
|
||||
public void noCompression()
|
||||
{
|
||||
if (_gzStream==null)
|
||||
{
|
||||
if (getResponse().isCommitted() || _noGzip)
|
||||
{
|
||||
setContentLength(_contentLength);
|
||||
return getResponse().getOutputStream();
|
||||
}
|
||||
|
||||
_gzStream=newGzipStream(_request,(HttpServletResponse)getResponse(),_contentLength,_bufferSize,_minGzipSize);
|
||||
}
|
||||
else if (_writer!=null)
|
||||
throw new IllegalStateException("getWriter() called");
|
||||
|
||||
return _gzStream;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @see javax.servlet.ServletResponseWrapper#getWriter()
|
||||
*/
|
||||
@Override
|
||||
public PrintWriter getWriter() throws IOException
|
||||
{
|
||||
if (_writer==null)
|
||||
{
|
||||
if (_gzStream!=null)
|
||||
throw new IllegalStateException("getOutputStream() called");
|
||||
|
||||
if (getResponse().isCommitted() || _noGzip)
|
||||
{
|
||||
setContentLength(_contentLength);
|
||||
return getResponse().getWriter();
|
||||
}
|
||||
|
||||
_gzStream=newGzipStream(_request,(HttpServletResponse)getResponse(),_contentLength,_bufferSize,_minGzipSize);
|
||||
_writer=newWriter(_gzStream,getCharacterEncoding());
|
||||
}
|
||||
return _writer;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* No gzip.
|
||||
*/
|
||||
public void noGzip()
|
||||
{
|
||||
_noGzip=true;
|
||||
if (_gzStream!=null)
|
||||
_noCompression=true;
|
||||
if (_compressedStream!=null)
|
||||
{
|
||||
try
|
||||
{
|
||||
_gzStream.doNotGzip();
|
||||
_compressedStream.doNotCompress();
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
|
@ -386,38 +284,110 @@ public class GzipResponseWrapper extends HttpServletResponseWrapper
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* Finish.
|
||||
*
|
||||
* @throws IOException Signals that an I/O exception has occurred.
|
||||
* @see org.eclipse.jetty.http.gzip.CompressedResponseWrapper#finish()
|
||||
*/
|
||||
public void finish() throws IOException
|
||||
{
|
||||
if (_writer!=null && !_gzStream._closed)
|
||||
if (_writer!=null && !_compressedStream.isClosed())
|
||||
_writer.flush();
|
||||
if (_gzStream!=null)
|
||||
_gzStream.finish();
|
||||
if (_compressedStream!=null)
|
||||
_compressedStream.finish();
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @see org.eclipse.jetty.http.gzip.CompressedResponseWrapper#setHeader(java.lang.String, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public void setHeader(String name, String value)
|
||||
{
|
||||
if ("content-length".equalsIgnoreCase(name))
|
||||
{
|
||||
setContentLength(Long.parseLong(value));
|
||||
}
|
||||
else if ("content-type".equalsIgnoreCase(name))
|
||||
{
|
||||
setContentType(value);
|
||||
}
|
||||
else if ("content-encoding".equalsIgnoreCase(name))
|
||||
{
|
||||
super.setHeader(name,value);
|
||||
if (!isCommitted())
|
||||
{
|
||||
noCompression();
|
||||
}
|
||||
}
|
||||
else
|
||||
super.setHeader(name,value);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @see org.eclipse.jetty.http.gzip.CompressedResponseWrapper#getOutputStream()
|
||||
*/
|
||||
@Override
|
||||
public ServletOutputStream getOutputStream() throws IOException
|
||||
{
|
||||
if (_compressedStream==null)
|
||||
{
|
||||
if (getResponse().isCommitted() || _noCompression)
|
||||
{
|
||||
setContentLength(_contentLength);
|
||||
return getResponse().getOutputStream();
|
||||
}
|
||||
|
||||
_compressedStream=newCompressedStream(_request,(HttpServletResponse)getResponse(),_contentLength,_bufferSize,_minCompressSize);
|
||||
}
|
||||
else if (_writer!=null)
|
||||
throw new IllegalStateException("getWriter() called");
|
||||
|
||||
return _compressedStream;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* Allows derived implementations to replace GzipStream implementation.
|
||||
*
|
||||
* @param request the request
|
||||
* @param response the response
|
||||
* @param contentLength the content length
|
||||
* @param bufferSize the buffer size
|
||||
* @param minGzipSize the min gzip size
|
||||
* @return the gzip stream
|
||||
* @throws IOException Signals that an I/O exception has occurred.
|
||||
* @see org.eclipse.jetty.http.gzip.CompressedResponseWrapper#getWriter()
|
||||
*/
|
||||
protected GzipStream newGzipStream(HttpServletRequest request,HttpServletResponse response,long contentLength,int bufferSize, int minGzipSize) throws IOException
|
||||
@Override
|
||||
public PrintWriter getWriter() throws IOException
|
||||
{
|
||||
return new GzipStream(request,response,contentLength,bufferSize,minGzipSize);
|
||||
if (_writer==null)
|
||||
{
|
||||
if (_compressedStream!=null)
|
||||
throw new IllegalStateException("getOutputStream() called");
|
||||
|
||||
if (getResponse().isCommitted() || _noCompression)
|
||||
{
|
||||
setContentLength(_contentLength);
|
||||
return getResponse().getWriter();
|
||||
}
|
||||
|
||||
_compressedStream=newCompressedStream(_request,(HttpServletResponse)getResponse(),_contentLength,_bufferSize,_minCompressSize);
|
||||
_writer=newWriter(_compressedStream,getCharacterEncoding());
|
||||
}
|
||||
return _writer;
|
||||
}
|
||||
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @see org.eclipse.jetty.http.gzip.CompressedResponseWrapper#setIntHeader(java.lang.String, int)
|
||||
*/
|
||||
@Override
|
||||
public void setIntHeader(String name, int value)
|
||||
{
|
||||
if ("content-length".equalsIgnoreCase(name))
|
||||
{
|
||||
_contentLength=value;
|
||||
if (_compressedStream!=null)
|
||||
_compressedStream.setContentLength(_contentLength);
|
||||
}
|
||||
else
|
||||
super.setIntHeader(name,value);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* Allows derived implementations to replace PrintWriter implementation.
|
||||
|
@ -431,5 +401,11 @@ public class GzipResponseWrapper extends HttpServletResponseWrapper
|
|||
{
|
||||
return encoding==null?new PrintWriter(out):new PrintWriter(new OutputStreamWriter(out,encoding));
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
*@return the underlying CompressedStream implementation
|
||||
*/
|
||||
protected abstract AbstractCompressedStream newCompressedStream(HttpServletRequest _request, HttpServletResponse response, long _contentLength2, int _bufferSize2, int _minCompressedSize2) throws IOException;
|
||||
|
||||
}
|
|
@ -1,310 +0,0 @@
|
|||
// ========================================================================
|
||||
// Copyright (c) Webtide LLC
|
||||
// ------------------------------------------------------------------------
|
||||
// All rights reserved. This program and the accompanying materials
|
||||
// are made available under the terms of the Eclipse Public License v1.0
|
||||
// and Apache License v2.0 which accompanies this distribution.
|
||||
// The Eclipse Public License is available at
|
||||
// http://www.eclipse.org/legal/epl-v10.html
|
||||
// The Apache License v2.0 is available at
|
||||
// http://www.opensource.org/licenses/apache2.0.php
|
||||
// You may elect to redistribute this code under either of these licenses.
|
||||
// ========================================================================
|
||||
|
||||
|
||||
package org.eclipse.jetty.http.gzip;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.zip.GZIPOutputStream;
|
||||
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.eclipse.jetty.util.ByteArrayOutputStream2;
|
||||
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
*/
|
||||
public class GzipStream extends ServletOutputStream
|
||||
{
|
||||
protected HttpServletRequest _request;
|
||||
protected HttpServletResponse _response;
|
||||
protected OutputStream _out;
|
||||
protected ByteArrayOutputStream2 _bOut;
|
||||
protected GZIPOutputStream _gzOut;
|
||||
protected boolean _closed;
|
||||
protected int _bufferSize;
|
||||
protected int _minGzipSize;
|
||||
protected long _contentLength;
|
||||
protected boolean _doNotGzip;
|
||||
|
||||
/**
|
||||
* Instantiates a new gzip stream.
|
||||
*
|
||||
* @param request the request
|
||||
* @param response the response
|
||||
* @param contentLength the content length
|
||||
* @param bufferSize the buffer size
|
||||
* @param minGzipSize the min gzip size
|
||||
* @throws IOException Signals that an I/O exception has occurred.
|
||||
*/
|
||||
public GzipStream(HttpServletRequest request,HttpServletResponse response,long contentLength,int bufferSize, int minGzipSize) throws IOException
|
||||
{
|
||||
_request=request;
|
||||
_response=response;
|
||||
_contentLength=contentLength;
|
||||
_bufferSize=bufferSize;
|
||||
_minGzipSize=minGzipSize;
|
||||
if (minGzipSize==0)
|
||||
doGzip();
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset buffer.
|
||||
*/
|
||||
public void resetBuffer()
|
||||
{
|
||||
if (_response.isCommitted())
|
||||
throw new IllegalStateException("Committed");
|
||||
_closed=false;
|
||||
_out=null;
|
||||
_bOut=null;
|
||||
if (_gzOut!=null)
|
||||
_response.setHeader("Content-Encoding",null);
|
||||
_gzOut=null;
|
||||
_doNotGzip=false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the content length.
|
||||
*
|
||||
* @param length the new content length
|
||||
*/
|
||||
public void setContentLength(long length)
|
||||
{
|
||||
_contentLength=length;
|
||||
if (_doNotGzip && length>=0)
|
||||
{
|
||||
if(_contentLength<Integer.MAX_VALUE)
|
||||
_response.setContentLength((int)_contentLength);
|
||||
else
|
||||
_response.setHeader("Content-Length",Long.toString(_contentLength));
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @see java.io.OutputStream#flush()
|
||||
*/
|
||||
@Override
|
||||
public void flush() throws IOException
|
||||
{
|
||||
if (_out==null || _bOut!=null)
|
||||
{
|
||||
if (_contentLength>0 && _contentLength<_minGzipSize)
|
||||
doNotGzip();
|
||||
else
|
||||
doGzip();
|
||||
}
|
||||
|
||||
_out.flush();
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @see java.io.OutputStream#close()
|
||||
*/
|
||||
@Override
|
||||
public void close() throws IOException
|
||||
{
|
||||
if (_closed)
|
||||
return;
|
||||
|
||||
if (_request.getAttribute("javax.servlet.include.request_uri")!=null)
|
||||
flush();
|
||||
else
|
||||
{
|
||||
if (_bOut!=null)
|
||||
{
|
||||
if (_contentLength<0)
|
||||
_contentLength=_bOut.getCount();
|
||||
if (_contentLength<_minGzipSize)
|
||||
doNotGzip();
|
||||
else
|
||||
doGzip();
|
||||
}
|
||||
else if (_out==null)
|
||||
{
|
||||
doNotGzip();
|
||||
}
|
||||
|
||||
if (_gzOut!=null)
|
||||
_gzOut.close();
|
||||
else
|
||||
_out.close();
|
||||
_closed=true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Finish.
|
||||
*
|
||||
* @throws IOException Signals that an I/O exception has occurred.
|
||||
*/
|
||||
public void finish() throws IOException
|
||||
{
|
||||
if (!_closed)
|
||||
{
|
||||
if (_out==null || _bOut!=null)
|
||||
{
|
||||
if (_contentLength>0 && _contentLength<_minGzipSize)
|
||||
doNotGzip();
|
||||
else
|
||||
doGzip();
|
||||
}
|
||||
|
||||
if (_gzOut!=null && !_closed)
|
||||
{
|
||||
_closed=true;
|
||||
_gzOut.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @see java.io.OutputStream#write(int)
|
||||
*/
|
||||
@Override
|
||||
public void write(int b) throws IOException
|
||||
{
|
||||
checkOut(1);
|
||||
_out.write(b);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @see java.io.OutputStream#write(byte[])
|
||||
*/
|
||||
@Override
|
||||
public void write(byte b[]) throws IOException
|
||||
{
|
||||
checkOut(b.length);
|
||||
_out.write(b);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @see java.io.OutputStream#write(byte[], int, int)
|
||||
*/
|
||||
@Override
|
||||
public void write(byte b[], int off, int len) throws IOException
|
||||
{
|
||||
checkOut(len);
|
||||
_out.write(b,off,len);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the content encoding gzip.
|
||||
*
|
||||
* @return true, if successful
|
||||
*/
|
||||
protected boolean setContentEncodingGzip()
|
||||
{
|
||||
_response.setHeader("Content-Encoding", "gzip");
|
||||
return _response.containsHeader("Content-Encoding");
|
||||
}
|
||||
|
||||
/**
|
||||
* Do gzip.
|
||||
*
|
||||
* @throws IOException Signals that an I/O exception has occurred.
|
||||
*/
|
||||
public void doGzip() throws IOException
|
||||
{
|
||||
if (_gzOut==null)
|
||||
{
|
||||
if (_response.isCommitted())
|
||||
throw new IllegalStateException();
|
||||
|
||||
if (setContentEncodingGzip())
|
||||
{
|
||||
_out=_gzOut=new GZIPOutputStream(_response.getOutputStream(),_bufferSize);
|
||||
|
||||
if (_bOut!=null)
|
||||
{
|
||||
_out.write(_bOut.getBuf(),0,_bOut.getCount());
|
||||
_bOut=null;
|
||||
}
|
||||
}
|
||||
else
|
||||
doNotGzip();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Do not gzip.
|
||||
*
|
||||
* @throws IOException Signals that an I/O exception has occurred.
|
||||
*/
|
||||
public void doNotGzip() throws IOException
|
||||
{
|
||||
if (_gzOut!=null)
|
||||
throw new IllegalStateException();
|
||||
if (_out==null || _bOut!=null )
|
||||
{
|
||||
_doNotGzip = true;
|
||||
|
||||
_out=_response.getOutputStream();
|
||||
setContentLength(_contentLength);
|
||||
|
||||
if (_bOut!=null)
|
||||
_out.write(_bOut.getBuf(),0,_bOut.getCount());
|
||||
_bOut=null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check out.
|
||||
*
|
||||
* @param length the length
|
||||
* @throws IOException Signals that an I/O exception has occurred.
|
||||
*/
|
||||
private void checkOut(int length) throws IOException
|
||||
{
|
||||
if (_closed)
|
||||
throw new IOException("CLOSED");
|
||||
|
||||
if (_out==null)
|
||||
{
|
||||
if (_response.isCommitted() || (_contentLength>=0 && _contentLength<_minGzipSize))
|
||||
doNotGzip();
|
||||
else if (length>_minGzipSize)
|
||||
doGzip();
|
||||
else
|
||||
_out=_bOut=new ByteArrayOutputStream2(_bufferSize);
|
||||
}
|
||||
else if (_bOut!=null)
|
||||
{
|
||||
if (_response.isCommitted() || (_contentLength>=0 && _contentLength<_minGzipSize))
|
||||
doNotGzip();
|
||||
else if (length>=(_bOut.getBuf().length -_bOut.getCount()))
|
||||
doGzip();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows derived implementations to replace PrintWriter implementation.
|
||||
*/
|
||||
protected PrintWriter newWriter(OutputStream out,String encoding) throws UnsupportedEncodingException
|
||||
{
|
||||
return encoding==null?new PrintWriter(out):new PrintWriter(new OutputStreamWriter(out,encoding));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.http.ssl;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
|
|
|
@ -14,17 +14,18 @@
|
|||
package org.eclipse.jetty.http;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.not;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.matchers.JUnitMatchers.containsString;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import org.eclipse.jetty.http.HttpGenerator.Action;
|
||||
import org.eclipse.jetty.util.BufferUtil;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
public class HttpGeneratorClientTest
|
||||
{
|
||||
public final static String CONTENT="The quick brown fox jumped over the lazy dog.\nNow is the time for all good men to come to the aid of the party\nThe moon is blue to a fish in love.\n";
|
||||
|
@ -242,7 +243,7 @@ public class HttpGeneratorClientTest
|
|||
assertTrue(head.endsWith("\r\n\r\n10\r\n"));
|
||||
assertThat(body,containsString("dog"));
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testRequestWithLargeChunkedContent() throws Exception
|
||||
{
|
||||
|
@ -253,7 +254,6 @@ public class HttpGeneratorClientTest
|
|||
HttpGenerator gen = new HttpGenerator();
|
||||
gen.setLargeContent(8);
|
||||
|
||||
|
||||
HttpGenerator.Result
|
||||
|
||||
result=gen.generate(null,null,null,null,content0,null);
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.http;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<version>9.0.0-SNAPSHOT</version>
|
||||
<version>8.1.6-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-io</artifactId>
|
||||
|
|
|
@ -150,6 +150,15 @@ public class AsyncByteArrayEndPoint extends ByteArrayEndPoint implements AsyncEn
|
|||
public void onOpen()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close()
|
||||
{
|
||||
boolean was_open=isOpen();
|
||||
super.close();
|
||||
if (was_open)
|
||||
onClose();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClose()
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
// ========================================================================
|
||||
// Copyright (c) 2004-2012 Mort Bay Consulting Pty. Ltd.
|
||||
// ------------------------------------------------------------------------
|
||||
// All rights reserved. This program and the accompanying materials
|
||||
// are made available under the terms of the Eclipse Public License v1.0
|
||||
// and Apache License v2.0 which accompanies this distribution.
|
||||
// The Eclipse Public License is available at
|
||||
// http://www.eclipse.org/legal/epl-v10.html
|
||||
// The Apache License v2.0 is available at
|
||||
// http://www.opensource.org/licenses/apache2.0.php
|
||||
// You may elect to redistribute this code under either of these licenses.
|
||||
// ========================================================================
|
||||
|
||||
package org.eclipse.jetty.io;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// ========================================================================
|
||||
// Copyright (c) 2004-2009 Mort Bay Consulting Pty. Ltd.
|
||||
// Copyright (c) 2004-2012 Mort Bay Consulting Pty. Ltd.
|
||||
// ------------------------------------------------------------------------
|
||||
// All rights reserved. This program and the accompanying materials
|
||||
// are made available under the terms of the Eclipse Public License v1.0
|
||||
|
@ -222,7 +222,7 @@ public class ByteArrayEndPoint extends AbstractEndPoint
|
|||
public void close()
|
||||
{
|
||||
_closed=true;
|
||||
// TODO: for sbordet to fix - onClose();
|
||||
// TODO: for sbordet to fix - onClose(); Moved invocation to AsycnByteArrayEndPoint for now (GW)
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
|
|
|
@ -149,7 +149,6 @@ public abstract class SelectorManager extends AbstractLifeCycle implements Dumpa
|
|||
*/
|
||||
protected void endPointOpened(AsyncEndPoint endpoint)
|
||||
{
|
||||
endpoint.getAsyncConnection().onOpen();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.io;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import java.nio.channels.ServerSocketChannel;
|
||||
import java.nio.channels.SocketChannel;
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.io;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
|
|
|
@ -290,7 +290,7 @@ public class IOTest
|
|||
Socket client;
|
||||
Socket server;
|
||||
|
||||
connector = new ServerSocket(9123);
|
||||
connector = new ServerSocket(0);
|
||||
client = new Socket("127.0.0.1",connector.getLocalPort());
|
||||
server = connector.accept();
|
||||
client.setTcpNoDelay(true);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.0.0-SNAPSHOT</version>
|
||||
<version>8.1.6-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-jaspi</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.0.0-SNAPSHOT</version>
|
||||
<version>8.1.6-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-jmx</artifactId>
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
-->
|
||||
<!--
|
||||
<Call name="createRegistry" class="java.rmi.registry.LocateRegistry">
|
||||
<Arg type="java.lang.Integer">1099</Arg>
|
||||
<Arg type="java.lang.Integer"><SystemProperty name="jetty.jmxrmiport" default="1099"/></Arg>
|
||||
<Call name="sleep" class="java.lang.Thread">
|
||||
<Arg type="java.lang.Integer">1000</Arg>
|
||||
</Call>
|
||||
|
@ -91,11 +91,11 @@
|
|||
<New class="javax.management.remote.JMXServiceURL">
|
||||
<Arg type="java.lang.String">rmi</Arg>
|
||||
<Arg type="java.lang.String" />
|
||||
<Arg type="java.lang.Integer">0</Arg>
|
||||
<Arg type="java.lang.String">/jndi/rmi://localhost:1099/jettyjmx</Arg>
|
||||
<Arg type="java.lang.Integer"><SystemProperty name="jetty.jmxrmiport" default="1099"/></Arg>
|
||||
<Arg type="java.lang.String">/jndi/rmi://<SystemProperty name="jetty.jmxrmihost" default="localhost"/>:<SystemProperty name="jetty.jmxrmiport" default="1099"/>/jmxrmi</Arg>
|
||||
</New>
|
||||
</Arg>
|
||||
<Arg>org.eclipse.jetty:name=rmiconnectorserver</Arg>
|
||||
<Arg>org.eclipse.jetty.jmx:name=rmiconnectorserver</Arg>
|
||||
<Call name="start" />
|
||||
</New>
|
||||
-->
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.0.0-SNAPSHOT</version>
|
||||
<version>8.1.6-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-jndi</artifactId>
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package org.eclipse.jetty.jndi;
|
||||
//========================================================================
|
||||
//Copyright 2011-2012 Mort Bay Consulting Pty. Ltd.
|
||||
//------------------------------------------------------------------------
|
||||
//All rights reserved. This program and the accompanying materials
|
||||
//are made available under the terms of the Eclipse Public License v1.0
|
||||
//and Apache License v2.0 which accompanies this distribution.
|
||||
//The Eclipse Public License is available at
|
||||
//http://www.eclipse.org/legal/epl-v10.html
|
||||
//The Apache License v2.0 is available at
|
||||
//http://www.opensource.org/licenses/apache2.0.php
|
||||
//You may elect to redistribute this code under either of these licenses.
|
||||
//========================================================================
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.sql.Statement;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<parent>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-project</artifactId>
|
||||
<version>9.0.0-SNAPSHOT</version>
|
||||
<version>8.1.6-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jetty-jsp</artifactId>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue