http2

How to detect if the visitor is using HTTP/2 or SPDY

左心房为你撑大大i 提交于 2019-12-04 11:33:25
Hi guys I am searching for a script which can detect if the visitor's browser has enabled SPDY or HTTP/2. Something like this https://www.ist-http2-aktiviert.de/ Theoretically, once nextHopProtocol lands in ResourceTiming and NavigationTiming , you should be able to detect h2 support for the root page and other resources. As of 2016-06-06, nextHopProtocol is only available in Firefox's ResourceTiming implementation. It is not available in their NavigationTiming, or in either NavigationTiming nor ResourceTiming for Chrome, FF, and Safari. So for Firefox visitors today, you could see if

HTTP/2 with OkHttp

老子叫甜甜 提交于 2019-12-04 09:07:18
I am trying to communicate with a HTTP/2 server using OkHttp client. Added to Maven POM: <dependency> <groupId>com.squareup.okhttp3</groupId> <artifactId>okhttp</artifactId> <version>3.2.0</version> </dependency> And this is my test code: OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder().url("https://http2.akamai.com/demo").build(); Response response = client.newCall(request).execute(); System.out.println("Protocol: " + response.protocol()); System.out.println(response.body().string()); But when I run it it prints: Protocol: http/1.1 and This browser is not HTTP

Is gRPC(HTTP/2) faster than REST with HTTP/2?

☆樱花仙子☆ 提交于 2019-12-04 07:25:33
问题 The goal is to introduce a transport and application layer protocol that is better in its latency and network throughput . Currently, the application uses REST with HTTP/1.1 and we experience a high latency. I need to resolve this latency problem and I am open to use either gRPC(HTTP/2) or REST/HTTP2 . HTTP/2: Multiplexed Single TCP Connection Binary instead of textual Header compression Server Push I am aware of all the above advantages. Question No. 1: If I use REST with HTTP/2 , I am sure,

Does Apache or some other CLIENT JAVA implementation support HTTP/2?

淺唱寂寞╮ 提交于 2019-12-04 06:37:22
I'm looking for java client that can connect to a HTTP/2 based server.. The server is already supporting HTTP/2 API. I don't see the most popular Apache Http client https://hc.apache.org/ still supporting HTTP/2. Does Apache have some implementation for Java client already that supports Http/2? If not, Is there some java client that supports connecting to HTTP/2 preferably on Java 7? Jetty 's provides two HTTP/2 Java client APIs. Both require Java 8 and the mandatory use of the ALPN, as explained here . Low level APIs These APIs are based on HTTP2Client , it's based on the HTTP/2 concepts of

How to do server push with standalone Jetty

醉酒当歌 提交于 2019-12-04 06:19:15
问题 I am trying to test the server push feature on a static website with standalone Jetty. My website consists of an index.html Â+ 1 CSS + a bunch of images. The directory structure is: /Album    Â|    Â|-----index.html    Â|-----style.css    Â|------/images         Â|         Â|-----image 1.png         Â|---a set of 100 images         Â|---image100.png As I just wanted to quickly test out the server push feature I did not code this website as a Java

Enabling http/2 in Apache 2.4 does not work

自闭症网瘾萝莉.ら 提交于 2019-12-04 04:53:55
问题 We are trying to enable http/2 on Apache 2.4, but with no success. The server OS is FreeBSD 11.2, and the OpenSSL version is 1.0.2o. We have a real and valid SSL Certificate with the rating A+ at Qualys SSL Server Test. No errors in log files, the server restarts without no problems or errors. Access website with https:// works, but browser always downgrades to http/1.1. We have this in our virtual section: <Directory /> Require all granted AllowOverride All SSLOptions +StdEnvVars </Directory

HTTP/2 or Websockets for low latency client to server messages

怎甘沉沦 提交于 2019-12-04 04:46:04
I have a requirement to have very low latency for client to server messages in my web application. I have seen several posts on stackoverflow saying it would be preferable to use websockets instead of HTTP for this requirement, but it was quite some time ago. Today, in 2018, with the progress of HTTP/2, is it still worth using websockets for this use case ? HTTP/2 has multiplexing , meaning that there should be no wait time - like there was under HTTP/1 due to the 6 connection limit per domain. So this means it could be used for a low latency connection as you say. However there are still

Why does apache2 module http2 not exist on Ubuntu 16.04?

六月ゝ 毕业季﹏ 提交于 2019-12-04 02:40:48
I'd like to install htt2_module. After a fresh installation of Ubuntu 14.04 following the steps listed in this link , I have tried to enable the http2_module just running sudo a2enmod http2 but I get: Module http2 does not exist! the apache version installed is:Apache/2.4.7 ,then as a workaround I tried with this link adding the following repository sudo add-apt-repository ppa:ondrej/apache2 after refreshing with sudo apt-get update, and running again the command to install/enable the http2 I get the same error. Module http2 does not exist. Actually, http2 module is supported on apache 2.4.17

How to use http/2 with Okhttp on Android devices?

流过昼夜 提交于 2019-12-04 00:46:07
I'M testing a site that supports HTTP/2, like this , and I try to use okhttp to send the request: OkHttpClient okHttpClient = new OkHttpClient(); Request request = new Request.Builder() .url("https://www.google.it") .build(); okHttpClient.newCall(request).enqueue(new Callback() { @Override public void onFailure(Request request, IOException e) { e.printStackTrace(); } @Override public void onResponse(Response response) throws IOException { Log.d("TestHttp", "OkHttp-Selected-Protocol: " + response.header("OkHttp-Selected-Protocol")); Log.d("TestHttp", "Response code is " + response.code()); } })

Sending HTTP/2 POST request in Ruby

荒凉一梦 提交于 2019-12-04 00:36:14
I am trying to use the new Apple Push Notification API, which is based on HTTP/2 . I found the http-2 Ruby gem, but the documentation isn’t clear about how to make requests as a client. How to make a HTTP/2 request in Ruby/Rails? There is an example of creating HTTP/2 client in this file . It could be adapted to APN requests like this: require 'socket' require 'http/2' payload = '{"foo":"bar"}' device_token = '00fc13adff785122b4ad28809a3420982341241421348097878e577c991de8f0' # example sock = TCPSocket.new('api.development.push.apple.com', 443) conn = HTTP2::Client.new conn.on(:frame) do |bytes