OK I upgraded to latest Jetty 9.1 and now HTTPS works fine, just as described in this article
http://www.eclipse.org/jetty/documentation/current/configuring-connectors.html However my HTTP is still over plain HTTP/1.1. So I tried to configure the HTTP connector with the same connection factories: -------------------------------------------------------------------- <Call name="addConnector"> <Arg> <New class="org.eclipse.jetty.server.ServerConnector"> <Arg name="server"><Ref refid="Server" /></Arg> <Arg name="factories"> <Array type="org.eclipse.jetty.server.ConnectionFactory"> <!-- SPDY/3 Connection factory --> <Item> <New class="org.eclipse.jetty.spdy.server.http.HTTPSPDYServerConnectionFactory"> <Arg name="version" type="int">3</Arg> <Arg name="config"> <Ref refid="httpConfig"/> </Arg> <Arg name="pushStrategy"> <Ref refid="pushStrategy"/> </Arg> </New> </Item> <!-- SPDY/2 Connection factory --> <Item> <New class="org.eclipse.jetty.spdy.server.http.HTTPSPDYServerConnectionFactory"> <Arg name="version" type="int">2</Arg> <Arg name="config"> <Ref refid="httpConfig"/> </Arg> </New> </Item> <!-- HTTP Connection factory --> <Item> <New class="org.eclipse.jetty.server.HttpConnectionFactory"> <Arg name="config"> <Ref refid="httpConfig"/> </Arg> </New> </Item> </Array> </Arg> <Set name="host"><Property name="jetty.host" /></Set> <Set name="port"><Property name="jetty.port" default="8111" /></Set> <Set name="idleTimeout"><Property name="http.timeout" default="30000"/></Set> </New> </Arg> </Call> -------------------------------------------------------------------- But the result is: when I go to http://localhost:8111/ I get offered a binary file to download and when I download it I can see inside: <80>^C^@^C^@^@^@^HGET ^@^@^@^B<80>^C^@^G^@^@^@^H^@^@^@^@^@^@^@^@ How can I enable SPDY on both HTTP and HTTPS (https currently works)? 2014-02-04 11:33 GMT+02:00 Simone Bordet <[email protected]>: > Hi, > > On Mon, Feb 3, 2014 at 11:31 PM, Petar Tahchiev <[email protected]> > wrote: > > Hello everyone, > > > > I'm using Jetty version 8.1.14.v20131031 and jetty npn boot version > > 1.1.6.v20130911 and jetty npn api version 1.1.0.v20120525. I followed the > > documentation and declared 2 spdy connectors in my jetty.xml: > > -------------------------- > > <New id="sslContextFactory" > > class="org.eclipse.jetty.util.ssl.SslContextFactory"> > > <Set name="keyStore"><SystemProperty name="jetty.home" > default="." > > />/src/main/resources/keystore</Set> > > <Set name="keyStorePassword">AAAA</Set> > > <Set name="keyManagerPassword">BBBB</Set> > > <Set name="trustStore"><SystemProperty name="jetty.home" > default="." > > />/src/main/resources/keystore</Set> > > <Set name="trustStorePassword">CCCCC</Set> > > <Set name="protocol">TLSv1</Set> > > </New> > > <Call name="addConnector"> > > <Arg> > > <New > > class="org.eclipse.jetty.spdy.http.HTTPSPDYServerConnector"> > > <Set name="Port"><Property name="jetty.port" > > default="8111"/></Set> > > </New> > > </Arg> > > </Call> > > > > <Call name="addConnector"> > > <Arg> > > <New > > class="org.eclipse.jetty.spdy.http.HTTPSPDYServerConnector"> > > <Arg> > > <Ref id="sslContextFactory" /> > > </Arg> > > <Set name="Port">8112</Set> > > <Set name="statsOn">true</Set> > > </New> > > </Arg> > > </Call> > > ---------------------------------- > > I also declared the npn boot in my bootclasspath (I use maven jetty > plugin) > > ----------------------------------- > > <jvmArgs>-Xmx1024m -Xms512m -XX:+CMSClassUnloadingEnabled > > -XX:MaxPermSize=512m -XX:PermSize=256m > > > -Xbootclasspath/p:${settings.localRepository}/org/mortbay/jetty/npn/npn-boot/${jetty.npn.boot.version}/npn-boot-${jetty.npn.boot.version}.jar</jvmArgs> > > ----------------------------------- > > When starting jetty I see the following in the logs: > > ----------------------------------- > > [WARNING] !RequestLog > > [INFO] Started [email protected]:8111 > > [INFO] SPDY support is experimental. Please report feedback at > > [email protected] > > [INFO] Enabled Protocols [SSLv2Hello, SSLv3, TLSv1, TLSv1.1, TLSv1.2] of > > [SSLv2Hello, SSLv3, TLSv1, TLSv1.1, TLSv1.2] > > [INFO] Started [email protected]:8112 > > [INFO] SPDY support is experimental. Please report feedback at > > [email protected] > > [INFO] Started Jetty Server > > ----------------------------------- > > > > so it seems like the connectors are working. But when I go to > > http://localhost:8111/ chrome or firefox does not seem to detect that > this > > is spdy!!! > > The connector you have on 8111 is a clear-text SPDY connector. Only > Chrome speaks clear-text SPDY and only when launched with > > $ google-chrome --use-spdy=no-ssl > > The connector on port 8112 is over TLS and will work with any browser > that supports SPDY, but you need to restrict the TLS protocols as > described in the documentation to TLSv1 or greater (see > http://www.eclipse.org/jetty/documentation/current/spdy-configuring.html). > > -- > Simone Bordet > ---- > http://cometd.org > http://webtide.com > http://intalio.com > Developer advice, training, services and support > from the Jetty & CometD experts. > Intalio, the modern way to build business applications. > _______________________________________________ > jetty-users mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/jetty-users > -- Regards, Petar! Karlovo, Bulgaria. --- Public PGP Key at: https://keyserver1.pgp.com/vkd/DownloadKey.event?keyid=0x19658550C3110611 Key Fingerprint: A369 A7EE 61BC 93A3 CDFF 55A5 1965 8550 C311 0611
_______________________________________________ jetty-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/jetty-users
