Re: [jetty-users] Problems on 100-continue + HTTPS
I finally found the point. If using directory xxx.war, Jetty would throw java.lang.IllegalStateException like the below: No LoginService for org.eclipse.jetty.security.authentication.BasicAuthenticator@24a35978 in org.eclipse.jetty.security.ConstraintSecurityHandler@16f7c8c1 If using archive file xxx.war, it's fine. 2016-09-09 2:47 GMT+08:00 John Jiang: > Any update ;-) > > 2016-09-08 5:51 GMT+08:00 John Jiang : > >> Hi, >> BTW, I suffered from another problem when migrated my base to the new >> built Jetty. >> >> My application setups a Basic Authentication, like the below, >> web.xml >> >> BASIC >> Test Realm >> >> >> >> Authentication >> /auth/* >> >> >> >> admin >> user >> moderator >> >> >> >> mybase/etc/test-realm.xml >> >> http://www.eclipse.org/jetty/ >> configure_9_3.dtd"> >> >> >> >> >> >> >> >> >> >> >> >> Test Realm >> > default="etc/realm.properties"/> >> 0 >> >> >> >> >> >> demo test-realm is deployed. DO NOT USE IN >> PRODUCTION! >> >> >> >> But the server startup threw the following exception, >> java.lang.IllegalStateException: No LoginService for >> org.eclipse.jetty.security.authentication.BasicAuthenticator@24a35978 in >> org.eclipse.jetty.security.ConstraintSecurityHandler@16f7c8c1 >> at org.eclipse.jetty.security.authentication.LoginAuthenticator >> .setConfiguration(LoginAuthenticator.java:76) >> at org.eclipse.jetty.security.SecurityHandler.doStart(SecurityH >> andler.java:354) >> at org.eclipse.jetty.security.ConstraintSecurityHandler.doStart >> (ConstraintSecurityHandler.java:448) >> at org.eclipse.jetty.util.component.AbstractLifeCycle.start( >> AbstractLifeCycle.java:68) >> at org.eclipse.jetty.util.component.ContainerLifeCycle.start( >> ContainerLifeCycle.java:131) >> at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart( >> ContainerLifeCycle.java:105) >> at org.eclipse.jetty.server.handler.AbstractHandler.doStart( >> AbstractHandler.java:61) >> at org.eclipse.jetty.server.handler.ScopedHandler.doStart(Scope >> dHandler.java:120) >> at org.eclipse.jetty.server.session.SessionHandler.doStart( >> SessionHandler.java:116) >> at org.eclipse.jetty.util.component.AbstractLifeCycle.start( >> AbstractLifeCycle.java:68) >> at org.eclipse.jetty.util.component.ContainerLifeCycle.start( >> ContainerLifeCycle.java:131) >> at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart( >> ContainerLifeCycle.java:105) >> at org.eclipse.jetty.server.handler.AbstractHandler.doStart( >> AbstractHandler.java:61) >> at org.eclipse.jetty.server.handler.ScopedHandler.doStart(Scope >> dHandler.java:120) >> >> Does Jetty make some change on this area? >> Or I missed something on the migration? >> >> 2016-09-06 21:00 GMT+08:00 Simone Bordet : >> >>> Hi, >>> >>> On Tue, Sep 6, 2016 at 2:24 PM, John Jiang >>> wrote: >>> > Hi Simone, >>> > >>> > 2016-09-06 18:03 GMT+08:00 Simone Bordet : >>> >> >>> >> Hi, >>> >> >>> >> On Tue, Sep 6, 2016 at 12:00 PM, Simone Bordet >>> >> wrote: >>> >> > It was a bug, tracked here: >>> >> > https://github.com/eclipse/jetty.project/issues/902 >>> >> >>> >> It's fixed, can you try the latest Jetty 9.3.x code and report back if >>> >> it's working for you ? >>> > >>> > Clone all of the source codes and build it by myself? >>> >>> Yes, branch "jetty-9.3.x" and: >>> >>> mvn install -DskipTests=true >>> >>> for a quick build. >>> >>> -- >>> Simone Bordet >>> >>> http://cometd.org >>> http://webtide.com >>> Developer advice, training, services and support >>> from the Jetty & CometD experts. >>> ___ >>> jetty-users mailing list >>> jetty-users@eclipse.org >>> To change your delivery options, retrieve your password, or unsubscribe >>> from this list, visit >>> https://dev.eclipse.org/mailman/listinfo/jetty-users >>> >> >> > ___ jetty-users mailing list jetty-users@eclipse.org To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
Re: [jetty-users] Problems on 100-continue + HTTPS
Any update ;-) 2016-09-08 5:51 GMT+08:00 John Jiang: > Hi, > BTW, I suffered from another problem when migrated my base to the new > built Jetty. > > My application setups a Basic Authentication, like the below, > web.xml > > BASIC > Test Realm > > > > Authentication > /auth/* > > > > admin > user > moderator > > > > mybase/etc/test-realm.xml > > http://www.eclipse.org/jetty/ > configure_9_3.dtd"> > > > > > > > > > > > > Test Realm >default="etc/realm.properties"/> > 0 > > > > > > demo test-realm is deployed. DO NOT USE IN > PRODUCTION! > > > > But the server startup threw the following exception, > java.lang.IllegalStateException: No LoginService for > org.eclipse.jetty.security.authentication.BasicAuthenticator@24a35978 in > org.eclipse.jetty.security.ConstraintSecurityHandler@16f7c8c1 > at org.eclipse.jetty.security.authentication.LoginAuthenticator. > setConfiguration(LoginAuthenticator.java:76) > at org.eclipse.jetty.security.SecurityHandler.doStart( > SecurityHandler.java:354) > at org.eclipse.jetty.security.ConstraintSecurityHandler.doStart( > ConstraintSecurityHandler.java:448) > at org.eclipse.jetty.util.component.AbstractLifeCycle. > start(AbstractLifeCycle.java:68) > at org.eclipse.jetty.util.component.ContainerLifeCycle. > start(ContainerLifeCycle.java:131) > at org.eclipse.jetty.util.component.ContainerLifeCycle. > doStart(ContainerLifeCycle.java:105) > at org.eclipse.jetty.server.handler.AbstractHandler. > doStart(AbstractHandler.java:61) > at org.eclipse.jetty.server.handler.ScopedHandler.doStart( > ScopedHandler.java:120) > at org.eclipse.jetty.server.session.SessionHandler. > doStart(SessionHandler.java:116) > at org.eclipse.jetty.util.component.AbstractLifeCycle. > start(AbstractLifeCycle.java:68) > at org.eclipse.jetty.util.component.ContainerLifeCycle. > start(ContainerLifeCycle.java:131) > at org.eclipse.jetty.util.component.ContainerLifeCycle. > doStart(ContainerLifeCycle.java:105) > at org.eclipse.jetty.server.handler.AbstractHandler. > doStart(AbstractHandler.java:61) > at org.eclipse.jetty.server.handler.ScopedHandler.doStart( > ScopedHandler.java:120) > > Does Jetty make some change on this area? > Or I missed something on the migration? > > 2016-09-06 21:00 GMT+08:00 Simone Bordet : > >> Hi, >> >> On Tue, Sep 6, 2016 at 2:24 PM, John Jiang >> wrote: >> > Hi Simone, >> > >> > 2016-09-06 18:03 GMT+08:00 Simone Bordet : >> >> >> >> Hi, >> >> >> >> On Tue, Sep 6, 2016 at 12:00 PM, Simone Bordet >> >> wrote: >> >> > It was a bug, tracked here: >> >> > https://github.com/eclipse/jetty.project/issues/902 >> >> >> >> It's fixed, can you try the latest Jetty 9.3.x code and report back if >> >> it's working for you ? >> > >> > Clone all of the source codes and build it by myself? >> >> Yes, branch "jetty-9.3.x" and: >> >> mvn install -DskipTests=true >> >> for a quick build. >> >> -- >> Simone Bordet >> >> http://cometd.org >> http://webtide.com >> Developer advice, training, services and support >> from the Jetty & CometD experts. >> ___ >> jetty-users mailing list >> jetty-users@eclipse.org >> To change your delivery options, retrieve your password, or unsubscribe >> from this list, visit >> https://dev.eclipse.org/mailman/listinfo/jetty-users >> > > ___ jetty-users mailing list jetty-users@eclipse.org To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
Re: [jetty-users] Problems on 100-continue + HTTPS
2016-09-08 18:40 GMT+08:00 Simone Bordet: > Hi, > > On Thu, Sep 8, 2016 at 11:24 AM, John Jiang > wrote: > > I suppose Apache doesn't reset it. The stream just closes with NO_ERROR > > What client is this, curl ? > Yes. > > Note that the stream cannot be closed. > The server half-closes it because it sends a full 200 OK response, but > the client should not send the request body, but it may already have > told the server the Content-Length, so it has no other option than > reset. > > -- > Simone Bordet > > http://cometd.org > http://webtide.com > Developer advice, training, services and support > from the Jetty & CometD experts. > ___ > jetty-users mailing list > jetty-users@eclipse.org > To change your delivery options, retrieve your password, or unsubscribe > from this list, visit > https://dev.eclipse.org/mailman/listinfo/jetty-users > ___ jetty-users mailing list jetty-users@eclipse.org To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
Re: [jetty-users] Problems on 100-continue + HTTPS
Hi, 2016-09-08 15:27 GMT+08:00 Simone Bordet: > Hi, > > On Thu, Sep 8, 2016 at 1:25 AM, John Jiang > wrote: > > Tested the same cases with Apache 2.4.17, but no such message found. > > It looks Apache uses NO_ERROR. > > Apache resets the stream with NO_ERROR ? > The reset is fine, using NO_ERROR seems misleading, since the server > wants to tell the client that the stream needs to be canceled, hence > CANCEL_ERROR. > I suppose Apache doesn't reset it. The stream just closes with NO_ERROR > > > And for HTTP/1.1, Apache doesn't send "Connection: close" > > This looks like an Apache bug. > The server cannot keep the connection open, since the client won't > send the body, and the request is not finished yet, so the server > cannot read another request on that connection. > We have had a discussion with Roy T. Fielding about this behavior, and > what we have implemented is the agreed semantic for 100 Continue. > > -- > Simone Bordet > > http://cometd.org > http://webtide.com > Developer advice, training, services and support > from the Jetty & CometD experts. > ___ > jetty-users mailing list > jetty-users@eclipse.org > To change your delivery options, retrieve your password, or unsubscribe > from this list, visit > https://dev.eclipse.org/mailman/listinfo/jetty-users > ___ jetty-users mailing list jetty-users@eclipse.org To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
Re: [jetty-users] Problems on 100-continue + HTTPS
Hi, On Thu, Sep 8, 2016 at 1:25 AM, John Jiangwrote: > Tested the same cases with Apache 2.4.17, but no such message found. > It looks Apache uses NO_ERROR. Apache resets the stream with NO_ERROR ? The reset is fine, using NO_ERROR seems misleading, since the server wants to tell the client that the stream needs to be canceled, hence CANCEL_ERROR. > And for HTTP/1.1, Apache doesn't send "Connection: close" This looks like an Apache bug. The server cannot keep the connection open, since the client won't send the body, and the request is not finished yet, so the server cannot read another request on that connection. We have had a discussion with Roy T. Fielding about this behavior, and what we have implemented is the agreed semantic for 100 Continue. -- Simone Bordet http://cometd.org http://webtide.com Developer advice, training, services and support from the Jetty & CometD experts. ___ jetty-users mailing list jetty-users@eclipse.org To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
Re: [jetty-users] Problems on 100-continue + HTTPS
2016-09-07 16:39 GMT+08:00 Simone Bordet: > Hi, > > On Wed, Sep 7, 2016 at 7:56 AM, John Jiang > wrote: > > But I still found something interesting. > > In my webapp, /body is a pretty simple Servlet, which just print > something. > > Your servlet does one important thing: it calls > request.getInputStream(), which triggers the send of the 100 Continue > response. > > > If using a static file, like https://localhost:9021/index, namely, > > curl -k --http2 -H "Expect: 100-continue" -d "body" > > https://localhost:9021/index > > it looks no error. > > But if add -v option for curl, namley > > curl -vk --http2 -H "Expect: 100-continue" -d "body" > > https://localhost:9021/index > > I met: curl: (92) HTTP/2 stream 1 was not closed cleanly: CANCEL (err 8) > > > > I tried several times. > > 1. If accessing a Servlet, there is no error. > > 2. If accessing a static page, the following error raised: curl: (92) > HTTP/2 > > stream 1 was not closed cleanly: CANCEL (err 8) > > > > Is it a problem? > > What happens is that Jetty's DefaultServlet, which serves static > content, does not read the request body (because it does not expect > one). > Because it does not read the request body, it does not send the 100 > Continue response to the client. > DefaultServlet generates a 200 OK response with the static file > content as the response body. > Jetty then sees that the request is not finished, but nobody will ever > read the request body, so it generates a reset with code CANCEL to > tell the client to not send the content. > In HTTP/1.1 the server would have closed the connection. > > What you see is the right behavior. > Tested the same cases with Apache 2.4.17, but no such message found. It looks Apache uses NO_ERROR. And for HTTP/1.1, Apache doesn't send "Connection: close" I didn't try other server implementations. > -- > Simone Bordet > > http://cometd.org > http://webtide.com > Developer advice, training, services and support > from the Jetty & CometD experts. > ___ > jetty-users mailing list > jetty-users@eclipse.org > To change your delivery options, retrieve your password, or unsubscribe > from this list, visit > https://dev.eclipse.org/mailman/listinfo/jetty-users > ___ jetty-users mailing list jetty-users@eclipse.org To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
Re: [jetty-users] Problems on 100-continue + HTTPS
Java Environment: - java.home = C:\Programs\Java\jdk1.8.0\jre java.vm.vendor = Oracle Corporation java.vm.version = 25.60-b23 java.vm.name = Java HotSpot(TM) 64-Bit Server VM java.vm.info = mixed mode java.runtime.name = Java(TM) SE Runtime Environment java.runtime.version = 1.8.0_60-b60 java.io.tmpdir = C:\Programs\cygwin64\tmp\ user.dir = D:\http2\jetty\jetty-9.3.12\test-h1-base user.language = zh user.country = CN Jetty Environment: - jetty.version = 9.3.12-SNAPSHOT jetty.tag.version = master jetty.home = D:\http2\jetty\jetty-9.3.12 jetty.base = D:\http2\jetty\jetty-9.3.12\test-h1-base Config Search Order: ${jetty.base} -> D:\http2\jetty\jetty-9.3.12\test-h1-base ${jetty.home} -> D:\http2\jetty\jetty-9.3.12 JVM Arguments: -- (no jvm args specified) System Properties: -- (no system properties specified) Properties: --- java.version = 1.8.0_60 java.version.major = 1 java.version.minor = 8 java.version.revision = 0 java.version.update = 60 Jetty Server Classpath: --- Version Information on 27 entries in the classpath. Note: order presented here is how they would appear on the classpath. changes to the --module=name command line options will be reflected here. 0:3.1.0 | ${jetty.home}\lib\servlet-api-3.1.jar 1: 3.1.0.M0 | ${jetty.home}\lib\jetty-schemas-3.1.jar 2: 9.3.12-SNAPSHOT | ${jetty.home}\lib\jetty-http-9.3.12-SNAPSHOT.jar 3: 9.3.12-SNAPSHOT | ${jetty.home}\lib\jetty-server-9.3.12-SNAPSHOT.jar 4: 9.3.12-SNAPSHOT | ${jetty.home}\lib\jetty-xml-9.3.12-SNAPSHOT.jar 5: 9.3.12-SNAPSHOT | ${jetty.home}\lib\jetty-util-9.3.12-SNAPSHOT.jar 6: 9.3.12-SNAPSHOT | ${jetty.home}\lib\jetty-io-9.3.12-SNAPSHOT.jar 7: 9.3.12-SNAPSHOT | ${jetty.home}\lib\jetty-jndi-9.3.12-SNAPSHOT.jar 8: 1.4.1.v201005082020 | ${jetty.home}\lib\jndi\javax.mail.glassfish-1.4.1.v201005082020.jar 9: 1.2 | ${jetty.home}\lib\jndi\javax.transaction-api-1.2.jar 10: 9.3.12-SNAPSHOT | ${jetty.home}\lib\jetty-security-9.3.12-SNAPSHOT.jar 11: 9.3.12-SNAPSHOT | ${jetty.home}\lib\jetty-servlet-9.3.12-SNAPSHOT.jar 12: 9.3.12-SNAPSHOT | ${jetty.home}\lib\jetty-webapp-9.3.12-SNAPSHOT.jar 13: 9.3.12-SNAPSHOT | ${jetty.home}\lib\jetty-deploy-9.3.12-SNAPSHOT.jar 14: 9.3.12-SNAPSHOT | ${jetty.home}\lib\jetty-plus-9.3.12-SNAPSHOT.jar 15: 9.3.12-SNAPSHOT | ${jetty.home}\lib\jetty-annotations-9.3.12-SNAPSHOT.jar 16:5.0.1 | ${jetty.home}\lib\annotations\asm-5.0.1.jar 17:5.0.1 | ${jetty.home}\lib\annotations\asm-commons-5.0.1.jar 18: 1.2 | ${jetty.home}\lib\annotations\javax.annotation-api-1.2.jar 19: 1.0 | ${jetty.home}\lib\websocket\javax.websocket-api-1.0.jar 20: 9.3.12-SNAPSHOT | ${jetty.home}\lib\websocket\javax-websocket-client-impl-9.3.12-SNAPSHOT.jar 21: 9.3.12-SNAPSHOT | ${jetty.home}\lib\websocket\javax-websocket-server-impl-9.3.12-SNAPSHOT.jar 22: 9.3.12-SNAPSHOT | ${jetty.home}\lib\websocket\websocket-api-9.3.12-SNAPSHOT.jar 23: 9.3.12-SNAPSHOT | ${jetty.home}\lib\websocket\websocket-client-9.3.12-SNAPSHOT.jar 24: 9.3.12-SNAPSHOT | ${jetty.home}\lib\websocket\websocket-common-9.3.12-SNAPSHOT.jar 25: 9.3.12-SNAPSHOT | ${jetty.home}\lib\websocket\websocket-server-9.3.12-SNAPSHOT.jar 26: 9.3.12-SNAPSHOT | ${jetty.home}\lib\websocket\websocket-servlet-9.3.12-SNAPSHOT.jar Jetty Active XMLs: -- ${jetty.home}\etc\jetty.xml ${jetty.home}\etc\jetty-http.xml ${jetty.home}\etc\jetty-ssl.xml ${jetty.home}\etc\jetty-ssl-context.xml ${jetty.home}\etc\jetty-https.xml ${jetty.home}\etc\jetty-deploy.xml ${jetty.home}\etc\jetty-plus.xml ${jetty.home}\etc\jetty-annotations.xml 2016-09-08 6:15 GMT+08:00 Joakim Erdfelt: > Run this and report back ... > > $ cd /path/to/mybase > $ java -jar /path/to/jetty-dist/start.jar --list-config > > > > Joakim Erdfelt / joa...@webtide.com > > On Wed, Sep 7, 2016 at 2:51 PM, John Jiang > wrote: > >> Hi, >> BTW, I suffered from another problem when migrated my base to the new >> built Jetty. >> >> My application setups a Basic Authentication, like the below, >> web.xml >> >> BASIC >> Test Realm >> >> >> >> Authentication >> /auth/* >> >> >> >> admin >> user >> moderator >> >> >> >> mybase/etc/test-realm.xml >> >> http://www.eclipse.org/jetty/ >> configure_9_3.dtd"> >> >> >> >> >> >> >> >> >> >> >> >> Test Realm >> > default="etc/realm.properties"/> >> 0 >> >> >> >> >> >> demo test-realm is deployed. DO NOT USE IN >> PRODUCTION! >> >> >> >> But the
Re: [jetty-users] Problems on 100-continue + HTTPS
Run this and report back ... $ cd /path/to/mybase $ java -jar /path/to/jetty-dist/start.jar --list-config Joakim Erdfelt / joa...@webtide.com On Wed, Sep 7, 2016 at 2:51 PM, John Jiangwrote: > Hi, > BTW, I suffered from another problem when migrated my base to the new > built Jetty. > > My application setups a Basic Authentication, like the below, > web.xml > > BASIC > Test Realm > > > > Authentication > /auth/* > > > > admin > user > moderator > > > > mybase/etc/test-realm.xml > > http://www.eclipse.org/jetty/ > configure_9_3.dtd"> > > > > > > > > > > > > Test Realm >default="etc/realm.properties"/> > 0 > > > > > > demo test-realm is deployed. DO NOT USE IN > PRODUCTION! > > > > But the server startup threw the following exception, > java.lang.IllegalStateException: No LoginService for > org.eclipse.jetty.security.authentication.BasicAuthenticator@24a35978 in > org.eclipse.jetty.security.ConstraintSecurityHandler@16f7c8c1 > at org.eclipse.jetty.security.authentication.LoginAuthenticator. > setConfiguration(LoginAuthenticator.java:76) > at org.eclipse.jetty.security.SecurityHandler.doStart( > SecurityHandler.java:354) > at org.eclipse.jetty.security.ConstraintSecurityHandler.doStart( > ConstraintSecurityHandler.java:448) > at org.eclipse.jetty.util.component.AbstractLifeCycle. > start(AbstractLifeCycle.java:68) > at org.eclipse.jetty.util.component.ContainerLifeCycle. > start(ContainerLifeCycle.java:131) > at org.eclipse.jetty.util.component.ContainerLifeCycle. > doStart(ContainerLifeCycle.java:105) > at org.eclipse.jetty.server.handler.AbstractHandler. > doStart(AbstractHandler.java:61) > at org.eclipse.jetty.server.handler.ScopedHandler.doStart( > ScopedHandler.java:120) > at org.eclipse.jetty.server.session.SessionHandler. > doStart(SessionHandler.java:116) > at org.eclipse.jetty.util.component.AbstractLifeCycle. > start(AbstractLifeCycle.java:68) > at org.eclipse.jetty.util.component.ContainerLifeCycle. > start(ContainerLifeCycle.java:131) > at org.eclipse.jetty.util.component.ContainerLifeCycle. > doStart(ContainerLifeCycle.java:105) > at org.eclipse.jetty.server.handler.AbstractHandler. > doStart(AbstractHandler.java:61) > at org.eclipse.jetty.server.handler.ScopedHandler.doStart( > ScopedHandler.java:120) > > Does Jetty make some change on this area? > Or I missed something on the migration? > > 2016-09-06 21:00 GMT+08:00 Simone Bordet : > >> Hi, >> >> On Tue, Sep 6, 2016 at 2:24 PM, John Jiang >> wrote: >> > Hi Simone, >> > >> > 2016-09-06 18:03 GMT+08:00 Simone Bordet : >> >> >> >> Hi, >> >> >> >> On Tue, Sep 6, 2016 at 12:00 PM, Simone Bordet >> >> wrote: >> >> > It was a bug, tracked here: >> >> > https://github.com/eclipse/jetty.project/issues/902 >> >> >> >> It's fixed, can you try the latest Jetty 9.3.x code and report back if >> >> it's working for you ? >> > >> > Clone all of the source codes and build it by myself? >> >> Yes, branch "jetty-9.3.x" and: >> >> mvn install -DskipTests=true >> >> for a quick build. >> >> -- >> Simone Bordet >> >> http://cometd.org >> http://webtide.com >> Developer advice, training, services and support >> from the Jetty & CometD experts. >> ___ >> jetty-users mailing list >> jetty-users@eclipse.org >> To change your delivery options, retrieve your password, or unsubscribe >> from this list, visit >> https://dev.eclipse.org/mailman/listinfo/jetty-users >> > > > ___ > jetty-users mailing list > jetty-users@eclipse.org > To change your delivery options, retrieve your password, or unsubscribe > from this list, visit > https://dev.eclipse.org/mailman/listinfo/jetty-users > ___ jetty-users mailing list jetty-users@eclipse.org To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
Re: [jetty-users] Problems on 100-continue + HTTPS
Hi, BTW, I suffered from another problem when migrated my base to the new built Jetty. My application setups a Basic Authentication, like the below, web.xml BASIC Test Realm Authentication /auth/* admin user moderator mybase/etc/test-realm.xml http://www.eclipse.org/jetty/configure_9_3.dtd;> Test Realm 0 demo test-realm is deployed. DO NOT USE IN PRODUCTION! But the server startup threw the following exception, java.lang.IllegalStateException: No LoginService for org.eclipse.jetty.security.authentication.BasicAuthenticator@24a35978 in org.eclipse.jetty.security.ConstraintSecurityHandler@16f7c8c1 at org.eclipse.jetty.security.authentication.LoginAuthenticator.setConfiguration(LoginAuthenticator.java:76) at org.eclipse.jetty.security.SecurityHandler.doStart(SecurityHandler.java:354) at org.eclipse.jetty.security.ConstraintSecurityHandler.doStart(ConstraintSecurityHandler.java:448) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) at org.eclipse.jetty.server.handler.ScopedHandler.doStart(ScopedHandler.java:120) at org.eclipse.jetty.server.session.SessionHandler.doStart(SessionHandler.java:116) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) at org.eclipse.jetty.server.handler.ScopedHandler.doStart(ScopedHandler.java:120) Does Jetty make some change on this area? Or I missed something on the migration? 2016-09-06 21:00 GMT+08:00 Simone Bordet: > Hi, > > On Tue, Sep 6, 2016 at 2:24 PM, John Jiang > wrote: > > Hi Simone, > > > > 2016-09-06 18:03 GMT+08:00 Simone Bordet : > >> > >> Hi, > >> > >> On Tue, Sep 6, 2016 at 12:00 PM, Simone Bordet > >> wrote: > >> > It was a bug, tracked here: > >> > https://github.com/eclipse/jetty.project/issues/902 > >> > >> It's fixed, can you try the latest Jetty 9.3.x code and report back if > >> it's working for you ? > > > > Clone all of the source codes and build it by myself? > > Yes, branch "jetty-9.3.x" and: > > mvn install -DskipTests=true > > for a quick build. > > -- > Simone Bordet > > http://cometd.org > http://webtide.com > Developer advice, training, services and support > from the Jetty & CometD experts. > ___ > jetty-users mailing list > jetty-users@eclipse.org > To change your delivery options, retrieve your password, or unsubscribe > from this list, visit > https://dev.eclipse.org/mailman/listinfo/jetty-users > ___ jetty-users mailing list jetty-users@eclipse.org To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
Re: [jetty-users] Problems on 100-continue + HTTPS
Hi, On Wed, Sep 7, 2016 at 7:56 AM, John Jiangwrote: > But I still found something interesting. > In my webapp, /body is a pretty simple Servlet, which just print something. Your servlet does one important thing: it calls request.getInputStream(), which triggers the send of the 100 Continue response. > If using a static file, like https://localhost:9021/index, namely, > curl -k --http2 -H "Expect: 100-continue" -d "body" > https://localhost:9021/index > it looks no error. > But if add -v option for curl, namley > curl -vk --http2 -H "Expect: 100-continue" -d "body" > https://localhost:9021/index > I met: curl: (92) HTTP/2 stream 1 was not closed cleanly: CANCEL (err 8) > > I tried several times. > 1. If accessing a Servlet, there is no error. > 2. If accessing a static page, the following error raised: curl: (92) HTTP/2 > stream 1 was not closed cleanly: CANCEL (err 8) > > Is it a problem? What happens is that Jetty's DefaultServlet, which serves static content, does not read the request body (because it does not expect one). Because it does not read the request body, it does not send the 100 Continue response to the client. DefaultServlet generates a 200 OK response with the static file content as the response body. Jetty then sees that the request is not finished, but nobody will ever read the request body, so it generates a reset with code CANCEL to tell the client to not send the content. In HTTP/1.1 the server would have closed the connection. What you see is the right behavior. -- Simone Bordet http://cometd.org http://webtide.com Developer advice, training, services and support from the Jetty & CometD experts. ___ jetty-users mailing list jetty-users@eclipse.org To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
Re: [jetty-users] Problems on 100-continue + HTTPS
Hi, On Tue, Sep 6, 2016 at 2:24 PM, John Jiangwrote: > Hi Simone, > > 2016-09-06 18:03 GMT+08:00 Simone Bordet : >> >> Hi, >> >> On Tue, Sep 6, 2016 at 12:00 PM, Simone Bordet >> wrote: >> > It was a bug, tracked here: >> > https://github.com/eclipse/jetty.project/issues/902 >> >> It's fixed, can you try the latest Jetty 9.3.x code and report back if >> it's working for you ? > > Clone all of the source codes and build it by myself? Yes, branch "jetty-9.3.x" and: mvn install -DskipTests=true for a quick build. -- Simone Bordet http://cometd.org http://webtide.com Developer advice, training, services and support from the Jetty & CometD experts. ___ jetty-users mailing list jetty-users@eclipse.org To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
Re: [jetty-users] Problems on 100-continue + HTTPS
Hi Simone, 2016-09-06 18:03 GMT+08:00 Simone Bordet: > Hi, > > On Tue, Sep 6, 2016 at 12:00 PM, Simone Bordet > wrote: > > It was a bug, tracked here: https://github.com/eclipse/ > jetty.project/issues/902 > > It's fixed, can you try the latest Jetty 9.3.x code and report back if > it's working for you ? > Clone all of the source codes and build it by myself? > > -- > Simone Bordet > > http://cometd.org > http://webtide.com > Developer advice, training, services and support > from the Jetty & CometD experts. > ___ > jetty-users mailing list > jetty-users@eclipse.org > To change your delivery options, retrieve your password, or unsubscribe > from this list, visit > https://dev.eclipse.org/mailman/listinfo/jetty-users > ___ jetty-users mailing list jetty-users@eclipse.org To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
Re: [jetty-users] Problems on 100-continue + HTTPS
Hi, On Tue, Sep 6, 2016 at 12:00 PM, Simone Bordetwrote: > It was a bug, tracked here: > https://github.com/eclipse/jetty.project/issues/902 It's fixed, can you try the latest Jetty 9.3.x code and report back if it's working for you ? -- Simone Bordet http://cometd.org http://webtide.com Developer advice, training, services and support from the Jetty & CometD experts. ___ jetty-users mailing list jetty-users@eclipse.org To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
Re: [jetty-users] Problems on 100-continue + HTTPS
Hi, On Tue, Sep 6, 2016 at 7:37 AM, John Jiangwrote: > I'm using Jetty 9.3.8, and made it supporting h2 and h2c, like the below > info on starting the server. > 2016-09-06 13:23:52.505:INFO:oejs.ServerConnector:main: Started > ServerConnector@1f021e6c{HTTP/1.1,[http/1.1, h2c, h2c-17, h2c-16, h2c-15, > h2c-14]}{0.0.0.0:9020} > ... > 2016-09-06 13:23:52.721:INFO:oejs.ServerConnector:main: Started > ServerConnector@6fe7aac8{SSL,[ssl, alpn, h2, h2-17, h2-16, h2-15, h2-14, > http/1.1]}{0.0.0.0:9021} > > I used curl to test the server, like the below command, > curl -k --http2 -H "Expect: 100-continue" -d "body" > https://localhost:9021/body > then it just printed the following error: > curl: (92) HTTP/2 stream 1 was not closed cleanly: INTERNAL_ERROR (err 2) > If remove 100-continue header, like, > curl -k --http2 -d "body" https://localhost:9021/body > Or over HTTP, like > curl -k --http2 -H "Expect: 100-continue" -d "body" > http://localhost:9020/body > the results looked fine. > > Is it a Jetty bug on supporting 100-continue over TLS? It was a bug, tracked here: https://github.com/eclipse/jetty.project/issues/902 -- Simone Bordet http://cometd.org http://webtide.com Developer advice, training, services and support from the Jetty & CometD experts. ___ jetty-users mailing list jetty-users@eclipse.org To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users
[jetty-users] Problems on 100-continue + HTTPS
I'm using Jetty 9.3.8, and made it supporting h2 and h2c, like the below info on starting the server. 2016-09-06 13:23:52.505:INFO:oejs.ServerConnector:main: Started ServerConnector@1f021e6c{HTTP/1.1,[http/1.1, h2c, h2c-17, h2c-16, h2c-15, h2c-14]}{0.0.0.0:9020} ... 2016-09-06 13:23:52.721:INFO:oejs.ServerConnector:main: Started ServerConnector@6fe7aac8{SSL,[ssl, alpn, h2, h2-17, h2-16, h2-15, h2-14, http/1.1]}{0.0.0.0:9021} I used curl to test the server, like the below command, curl -k --http2 -H "Expect: 100-continue" -d "body" https://localhost:9021/body then it just printed the following error: curl: (92) HTTP/2 stream 1 was not closed cleanly: INTERNAL_ERROR (err 2) If remove 100-continue header, like, curl -k --http2 -d "body" https://localhost:9021/body Or over HTTP, like curl -k --http2 -H "Expect: 100-continue" -d "body" http://localhost:9020/body the results looked fine. Is it a Jetty bug on supporting 100-continue over TLS? ___ jetty-users mailing list jetty-users@eclipse.org To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/jetty-users