Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] SPDY not working

Hi,

On Sat, Feb 8, 2014 at 2:32 PM, Petar Tahchiev <paranoiabla@xxxxxxxxx> wrote:
> 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)?

You cannot.

HTTP is the HTTP protocol and you cannot speak anything different than HTTP.

Conversely, "HTTPS" is not a protocol. It's TLS that wraps HTTP.
SPDY works in a way that TLS wraps SPDY instead of wrapping HTTP.
NPN is a TLS mechanism that tells the server side what protocol is
wrapped within TLS.

-- 
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.


Back to the top