Merge remote-tracking branch 'origin/jetty-9.3.x' into jetty-9.4.x

This commit is contained in:
Greg Wilkins 2016-07-13 11:12:33 +10:00
commit 9c881525b7
1 changed files with 7 additions and 1 deletions

View File

@ -24,6 +24,7 @@ import java.util.List;
import javax.net.ssl.SSLEngine; import javax.net.ssl.SSLEngine;
import org.eclipse.jetty.http.HttpVersion;
import org.eclipse.jetty.io.AbstractConnection; import org.eclipse.jetty.io.AbstractConnection;
import org.eclipse.jetty.io.Connection; import org.eclipse.jetty.io.Connection;
import org.eclipse.jetty.io.EndPoint; import org.eclipse.jetty.io.EndPoint;
@ -110,10 +111,15 @@ public abstract class NegotiatingServerConnectionFactory extends AbstractConnect
} }
} }
// if default protocol is not set, then it is the first protocol given // if default protocol is not set, then it is either HTTP/1.1 or
// the first protocol given
String dft = defaultProtocol; String dft = defaultProtocol;
if (dft == null && !negotiated.isEmpty()) if (dft == null && !negotiated.isEmpty())
{
if (negotiated.contains(HttpVersion.HTTP_1_1.asString()))
dft = HttpVersion.HTTP_1_1.asString();
dft = negotiated.get(0); dft = negotiated.get(0);
}
SSLEngine engine = null; SSLEngine engine = null;
EndPoint ep = endPoint; EndPoint ep = endPoint;